diff --git a/train_network.py b/train_network.py index b01ec117..ee073ba8 100644 --- a/train_network.py +++ b/train_network.py @@ -361,7 +361,7 @@ def train(args): noisy_latents = noise_scheduler.add_noise(latents, noise, timesteps) # Predict the noise residual - with autocast(): + with accelerator.autocast(): noise_pred = unet(noisy_latents, timesteps, encoder_hidden_states).sample if args.v_parameterization: