Skip to content

DreamBooth training script / FLUX.1 [dev] #9204

@lamm-mit

Description

@lamm-mit

Describe the bug

Thanks @bghira @sayakpaul for sharing the FLUX DreamBooth training scripts at https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/README_flux.md

I was trying to run the examples and also train on my own data (I have successfully used it to get fine-tunes using SD2.x, SDXL, etc.). While the LoRA training script works, I do not get a reduction in loss and am thinking that no training is happening (loss stays approximately constant, I tried a variety of LRs).

The full fine tune gives me a tensor dimension error:

[..] latents = latents.view(batch_size, height, width, channels // 4, 2, 2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: shape '[1, 4, 4, 16, 2, 2]' is invalid for input of size 65536 [...]

The fine tune with text model -train_text_encoder also throws an error message. I was curious if others have tried it or if you know if someone could have another working example that I could try?

Thank you!

Also tagging @linoytsaban who I believe has done some pull requests/bug fixes

Reproduction

Examples in README: https://github.com/huggingface/diffusers/blob/main/examples/dreambooth/README_flux.md

Logs

No response

System Info

diffusers-0.31.0.dev0

Who can help?

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions