mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-15 08:36:41 +00:00
Update train_network.py
This commit is contained in:
@@ -929,7 +929,7 @@ class NetworkTrainer:
|
||||
if torch.any(torch.isnan(latents)):
|
||||
accelerator.print("NaN found in latents, replacing with zeros")
|
||||
latents = torch.nan_to_num(latents, 0, out=latents)
|
||||
logger.info(f"Latents Shape: {latents.shape}")
|
||||
logger.info(f"Latents Shape: {latents.shape}")
|
||||
latents = latents * self.vae_scale_factor
|
||||
|
||||
# get multiplier for each sample
|
||||
|
||||
Reference in New Issue
Block a user