kohya-ss / sd-scripts

Apache License 2.0
4.93k stars 824 forks source link

Flux can't change prompt during training #1513

Open jpXerxes opened 3 weeks ago

jpXerxes commented 3 weeks ago

bmaltais says this is a problem in sd-scripts

Changing the prompt.txt during training produces the following message when the next sample point is reached, at which point it hangs. I like to change the prompt to see various aspects as the training proceeds, but can't with Flux loras.

(path)\venv\lib\site-packages\torch\utils\checkpoint.py:61: UserWarning: None of the inputs have requires_grad=True. Gradients will be None warnings.warn(

kohya-ss commented 3 weeks ago

Changing the prompt.txt during training produces the following message when the next sample point is reached, at which point it hangs. I like to change the prompt to see various aspects as the training proceeds, but can't with Flux loras.

For FLUX, changing the prompt for sample image generation is not supported currently. This is because T5XXL is very large and difficult to keep in memory. We cache the prompt in advance. Sorry for not documenting this.