summaryrefslogtreecommitdiffstats
path: root/training/functional.py
diff options
context:
space:
mode:
authorVolpeon <git@volpeon.ink>2023-03-02 12:26:02 +0100
committerVolpeon <git@volpeon.ink>2023-03-02 12:26:02 +0100
commit4831db0936db15db617aa7abf929b1861ea614ef (patch)
tree797082ff612d291f9cec40080a0cce71cf66abb1 /training/functional.py
parentChanged low freq noise (diff)
downloadtextual-inversion-diff-4831db0936db15db617aa7abf929b1861ea614ef.tar.gz
textual-inversion-diff-4831db0936db15db617aa7abf929b1861ea614ef.tar.bz2
textual-inversion-diff-4831db0936db15db617aa7abf929b1861ea614ef.zip
Better low freq noise
Diffstat (limited to 'training/functional.py')
-rw-r--r--training/functional.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/training/functional.py b/training/functional.py
index 8ea40bb..ac89048 100644
--- a/training/functional.py
+++ b/training/functional.py
@@ -277,7 +277,7 @@ def loss_step(
277 ) 277 )
278 278
279 if low_freq_noise != 0: 279 if low_freq_noise != 0:
280 noise *= 1 - low_freq_noise + low_freq_noise * torch.randn( 280 noise = noise * (1 - low_freq_noise) + low_freq_noise * torch.randn(
281 latents.shape[0], latents.shape[1], 1, 1, 281 latents.shape[0], latents.shape[1], 1, 1,
282 dtype=latents.dtype, 282 dtype=latents.dtype,
283 layout=latents.layout, 283 layout=latents.layout,