summaryrefslogtreecommitdiffstats
path: root/training
diff options
context:
space:
mode:
Diffstat (limited to 'training')
-rw-r--r--training/functional.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/training/functional.py b/training/functional.py
index ac89048..2d582bf 100644
--- a/training/functional.py
+++ b/training/functional.py
@@ -277,7 +277,14 @@ def loss_step(
277 ) 277 )
278 278
279 if low_freq_noise != 0: 279 if low_freq_noise != 0:
280 noise = noise * (1 - low_freq_noise) + low_freq_noise * torch.randn( 280 low_freq_factor = low_freq_noise * torch.randn(
281 latents.shape[0], 1, 1, 1,
282 dtype=latents.dtype,
283 layout=latents.layout,
284 device=latents.device,
285 generator=generator
286 )
287 noise = noise * (1 - low_freq_factor) + low_freq_factor * torch.randn(
281 latents.shape[0], latents.shape[1], 1, 1, 288 latents.shape[0], latents.shape[1], 1, 1,
282 dtype=latents.dtype, 289 dtype=latents.dtype,
283 layout=latents.layout, 290 layout=latents.layout,