diff options
author | Volpeon <git@volpeon.ink> | 2023-03-02 12:26:02 +0100 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2023-03-02 12:26:02 +0100 |
commit | 4831db0936db15db617aa7abf929b1861ea614ef (patch) | |
tree | 797082ff612d291f9cec40080a0cce71cf66abb1 /training | |
parent | Changed low freq noise (diff) | |
download | textual-inversion-diff-4831db0936db15db617aa7abf929b1861ea614ef.tar.gz textual-inversion-diff-4831db0936db15db617aa7abf929b1861ea614ef.tar.bz2 textual-inversion-diff-4831db0936db15db617aa7abf929b1861ea614ef.zip |
Better low freq noise
Diffstat (limited to 'training')
-rw-r--r-- | training/functional.py | 2 |
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, |