We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2f19175 + 793aeb9 commit 0640f01Copy full SHA for 0640f01
sdxl_train_control_net_lllite.py
@@ -477,7 +477,7 @@ def remove_model(old_ckpt_name):
477
478
accelerator.backward(loss)
479
if accelerator.sync_gradients and args.max_grad_norm != 0.0:
480
- params_to_clip = unet.get_trainable_params()
+ params_to_clip = accelerator.unwrap_model(unet).get_trainable_params()
481
accelerator.clip_grad_norm_(params_to_clip, args.max_grad_norm)
482
483
optimizer.step()
0 commit comments