Update README.md
Browse files
README.md
CHANGED
|
@@ -211,4 +211,39 @@ accelerate launch train_dreambooth_lora_sd3_miniature.py \
|
|
| 211 |
--max_train_steps=500 \
|
| 212 |
--checkpointing_steps=500 \
|
| 213 |
--seed="3234290"
|
| 214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
--max_train_steps=500 \
|
| 212 |
--checkpointing_steps=500 \
|
| 213 |
--seed="3234290"
|
| 214 |
+
|
| 215 |
+
### With prior preservation and more flexible training script
|
| 216 |
+
|
| 217 |
+
Training notebook with prior preservation, using more flexible framework: [SD3_DreamBooth-LoRA_Fine-Tune-with-prior-preservation.ipynb](https://huggingface.co/lamm-mit/stable-diffusion-3-medium-leaf-inspired/resolve/main/SD3_DreamBooth-LoRA_Fine-Tune-with-prior-preservation.ipynb)
|
| 218 |
+
|
| 219 |
+
The notebook automatically downloads the training code.
|
| 220 |
+
|
| 221 |
+
```raw
|
| 222 |
+
accelerate launch train_dreambooth_lora_sd3.py \
|
| 223 |
+
--pretrained_model_name_or_path="{pretrained_model_name_or_path}" \
|
| 224 |
+
--dataset_name="lamm-mit/{instance_output_dir}_data" \
|
| 225 |
+
--caption_column='caption' \
|
| 226 |
+
--image_column='image' \
|
| 227 |
+
--instance_prompt="{instance_prompt}" \
|
| 228 |
+
--with_prior_preservation \
|
| 229 |
+
--prior_loss_weight=1.0 \
|
| 230 |
+
--output_dir="{instance_output_dir}" \
|
| 231 |
+
--class_data_dir="{class_data_dir}" \
|
| 232 |
+
--class_prompt="{class_prompt}" \
|
| 233 |
+
--num_class_images={num_class_images} \
|
| 234 |
+
--mixed_precision="fp16" \
|
| 235 |
+
--resolution=1024 \
|
| 236 |
+
--train_batch_size=1 \
|
| 237 |
+
--gradient_accumulation_steps=4 \
|
| 238 |
+
--gradient_checkpointing \
|
| 239 |
+
--learning_rate=1e-4 \
|
| 240 |
+
--lr_scheduler="constant" \
|
| 241 |
+
--weighting_scheme="logit_normal" \
|
| 242 |
+
--lr_warmup_steps=0 \
|
| 243 |
+
--use_8bit_adam \
|
| 244 |
+
--max_train_steps=500 \
|
| 245 |
+
--checkpointing_steps=500 \
|
| 246 |
+
--seed="3234290"
|
| 247 |
+
```
|
| 248 |
+
|
| 249 |
+

|