You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: track actual accumulated samples for accurate effective batch size
Replace static _eff_bs = batch_size * accum_steps with actual sample
counting across micro-batches. Each micro-batch's actual sample count
(latents/images/captions shape[0]) is summed, then multiplied by
num_processes for DDP.
Handles:
- Incomplete last batch of epoch (fewer samples)
- Partial gradient accumulation (training ends mid-window)
- Uneven micro-batches within a single accumulation window
0 commit comments