Skip to content

Commit

Permalink
fix a mistake in text2image training script for kandinsky2.2 (hugging…
Browse files Browse the repository at this point in the history
…face#5244)

fix

Co-authored-by: yiyixuxu <yixu@Yis-MacBook-Pro.local>
  • Loading branch information
2 people authored and Jimmy committed Apr 26, 2024
1 parent 3e50f5f commit b36323f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def collate_fn(examples):
# Backpropagate
accelerator.backward(loss)
if accelerator.sync_gradients:
accelerator.clip_grad_norm_(prior.parameters(), args.max_grad_norm)
accelerator.clip_grad_norm_(lora_layers.parameters(), args.max_grad_norm)
optimizer.step()
lr_scheduler.step()
optimizer.zero_grad()
Expand Down

0 comments on commit b36323f

Please sign in to comment.