mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-08 22:35:09 +00:00
Fix validate_every_n_steps for gradient accumulation
This commit is contained in:
@@ -1388,7 +1388,7 @@ class NetworkTrainer:
|
||||
and global_step != 0 # Skip first step
|
||||
and global_step % args.validate_every_n_steps == 0
|
||||
)
|
||||
if validation_steps > 0 and should_validate_step:
|
||||
if accelerator.sync_gradients and validation_steps > 0 and should_validate_step:
|
||||
accelerator.print("Validating バリデーション処理...")
|
||||
|
||||
val_progress_bar = tqdm(
|
||||
|
||||
Reference in New Issue
Block a user