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
{{ message }}
Repository navigation
train_dreambooth_lora.py -- ValueError: Attempting to unscale FP16 gradients caused by "--validation_prompt" param. #13124
Hello, when I directly run the training script provided in examples/dreambooth, with the following command, I encounter the “Attempting to unscale FP16 gradients” error:
`accelerate launch examples/dreambooth/train_dreambooth_lora.py \
--mixed_precision="fp16" \
--pretrained_model_name_or_path=$MODEL_NAME \
--instance_data_dir=$INSTANCE_DIR \
--output_dir=$OUTPUT_DIR \
--instance_prompt="a photo of sks dog" \
--resolution=512 \
--train_batch_size=1 \
--gradient_accumulation_steps=1 \
--checkpointing_steps=100 \
--learning_rate=1e-4 \
--report_to="tensorboard" \
--lr_scheduler="constant" \
--lr_warmup_steps=0 \
--max_train_steps=500 \
--seed="0" \
--validation_prompt="A photo of sks dog in a bucket" \
--validation_epochs=50`
I then tried the solution proposed in PR #6554 and found that the following command does not trigger this issue:
My read: this is primarily a core implementation task tied to "train_dreambooth_lora.py -- ValueError: Attempting to unscale FP16 gradients caused by "--".
I will focus on these issue-specific points first: train_dreambooth_lora, valueerror, attempting.
First I will reproduce and confirm expected behavior for the core implementation path.
Then I will implement the fix with targeted tests and keep scope tight (good confidence).
I will share a working PR update fast (24h for first patch, 48h for final polish) with verification notes.
If this approach works for you, I can start now.
Quick follow-up on #13124: I am still available to work on this issue.
I can provide an initial implementation update within 24 hours and keep the scope tight.
If assignment changed, please let me know and I will avoid adding noise.
Activity
zhanglin2603 commentedon Feb 17, 2026
Hey, I went over #13124 and can take this on.
If this approach works for you, I can start now.
zhanglin2603 commentedon Feb 18, 2026
Quick follow-up on #13124: I am still available to work on this issue.
I can provide an initial implementation update within 24 hours and keep the scope tight.
If assignment changed, please let me know and I will avoid adding noise.
Fix `train_dreambooth_lora.py` fp16 unscale error after validation
Fix fp16 LoRA unscale crash after validation in train_dreambooth_lora.py
Fix fp16 LoRA unscale crash after validation in train_dreambooth_lora…
Fix fp16 LoRA unscale crash after validation in train_dreambooth_lora…