You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/dreambooth/README_flux.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -221,8 +221,12 @@ Instead, only a subset of these activations (the checkpoints) are stored and the
221
221
### 8-bit-Adam Optimizer
222
222
When training with `AdamW`(doesn't apply to `prodigy`) You can pass `--use_8bit_adam` to reduce the memory requirements of training.
223
223
Make sure to install `bitsandbytes` if you want to do so.
224
-
### latent caching
224
+
### Latent caching
225
225
When training w/o validation runs, we can pre-encode the training images with the vae, and then delete it to free up some memory.
226
-
to enable `latent_caching`, first, use the version in [this PR](https://github.com/huggingface/diffusers/blob/1b195933d04e4c8281a2634128c0d2d380893f73/examples/dreambooth/train_dreambooth_lora_flux.py), and then pass `--cache_latents`
226
+
to enable `latent_caching` simply pass `--cache_latents`.
227
+
### Precision of saved LoRA layers
228
+
By default, trained transformer layers are saved in the precision dtype in which training was performed. E.g. when training in mixed precision is enabled with `--mixed_precision="bf16"`, final finetuned layers will be saved in `torch.bfloat16` as well.
229
+
This reduces memory requirements significantly w/o a significant quality loss. Note that if you do wish to save the final layers in float32 at the expanse of more memory usage, you can do so by passing `--upcast_before_saving`.
230
+
227
231
## Other notes
228
232
Thanks to `bghira` and `ostris` for their help with reviewing & insight sharing ♥️
0 commit comments