bluestarburst
commited on
Commit
•
a76cfe3
1
Parent(s):
00e8857
Upload folder using huggingface_hub
Browse files
train.py
CHANGED
@@ -377,10 +377,7 @@ def main(
|
|
377 |
print("Loss:", loss)
|
378 |
|
379 |
# Backpropagate
|
380 |
-
|
381 |
-
|
382 |
-
with accelerator.scaler.scale_loss(loss) as scaled_loss:
|
383 |
-
scaled_loss.backward()
|
384 |
|
385 |
if accelerator.sync_gradients:
|
386 |
accelerator.clip_grad_norm_(unet.parameters(), max_grad_norm)
|
|
|
377 |
print("Loss:", loss)
|
378 |
|
379 |
# Backpropagate
|
380 |
+
accelerator.backward(loss)
|
|
|
|
|
|
|
381 |
|
382 |
if accelerator.sync_gradients:
|
383 |
accelerator.clip_grad_norm_(unet.parameters(), max_grad_norm)
|