fix Input type error in noise_pred when using DDP

This commit is contained in:
Isotr0py
2023-02-08 21:32:21 +08:00
parent b599adc938
commit 6473aa1dd7

View File

@@ -417,6 +417,7 @@ def train(args):
# Add noise to the latents according to the noise magnitude at each timestep
# (this is the forward diffusion process)
with autocast():
noisy_latents = noise_scheduler.add_noise(latents, noise, timesteps)
# Predict the noise residual