Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Examples] fix: prior preservation setting in DreamBooth LoRA SDXL script. #7242

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

sayakpaul
Copy link
Member

What does this PR do?

Fixes: #7239.

Example training command:

accelerate launch train_dreambooth_lora_sdxl.py \
  --pretrained_model_name_or_path="stabilityai/stable-diffusion-xl-base-1.0"  \
  --instance_data_dir="dog" \
  --pretrained_vae_model_name_or_path="madebyollin/sdxl-vae-fp16-fix" \
  --output_dir="dog-sdxl" \
  --mixed_precision="fp16" \
  --instance_prompt="a photo of sks dog" \
  --resolution=1024 \
  --train_batch_size=1 \
  --gradient_accumulation_steps=4 \
  --learning_rate=1e-4 \
  --report_to="wandb" \
  --lr_scheduler="constant" \
  --lr_warmup_steps=0 \
  --max_train_steps=500 \
  --validation_prompt="A photo of sks dog in a bucket" \
  --validation_epochs=25 \
  --seed="0" \
  --with_prior_preservation --class_data_dir="dog_class" --class_prompt="photo of a dog"

FYI: @shawnrushefsky.

@sayakpaul sayakpaul requested a review from linoytsaban March 7, 2024 06:58
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@linoytsaban linoytsaban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! sorry for the bug 🐞

@sayakpaul sayakpaul merged commit 0d4dfbb into main Mar 7, 2024
10 checks passed
@sayakpaul sayakpaul deleted the fix/prior-preservation-sdxl-dreambooth-lora branch March 7, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dreambooth SDXL LoRA - mat1 and mat2 shapes cannot be multiplied (2x2048 and 2816x1280)
3 participants