huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
24.19k stars 4.99k forks source link

[SD3] train_dreambooth_sd3.py --train_text_encoder fails #8507

Open float-trip opened 1 month ago

float-trip commented 1 month ago

Describe the bug

encode_prompt() is called with a parameter that is not defined in code (text_input_ids_list)

Reproduction

accelerate launch train_dreambooth_sd3.py [args] --train_text_encoder

Logs

Traceback (most recent call last):
  File "/root/diffusers/examples/dreambooth/train_dreambooth_sd3.py", line 1760, in <module>
    main(args)
  File "/root/diffusers/examples/dreambooth/train_dreambooth_sd3.py", line 1546, in main
    prompt_embeds, pooled_prompt_embeds = encode_prompt(
TypeError: encode_prompt() got an unexpected keyword argument 'text_input_ids_list'

System Info

Who can help?

@sayakpaul

bghira commented 1 month ago

currently this code serves as an example for how it could be done. i don't believe it's recommended to train the text encoders, as there are three of them and it's not optimised for this at all.

ironically, the LoRA training script which is likely the only way to do it without OOM, doesn't support training the text encoders.

sayakpaul commented 1 month ago

@float-trip thanks for the issue. Do you wanna open a PR to fix it?

I am happy to guide you throughout the process :)