Update train_network.py

This commit is contained in:
DKnight54
2025-01-31 01:56:30 +08:00
committed by GitHub
parent 12dd9f6b59
commit 5559d1b711

View File

@@ -1023,6 +1023,7 @@ class NetworkTrainer:
# Checks if the accelerator has performed an optimization step behind the scenes
example_tuple = (latents, batch["captions"])
logger.info(f"Example tuple: {example_tuple}")
if accelerator.sync_gradients:
progress_bar.update(1)
global_step += 1