diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-02-19 09:44:56 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-02-19 09:44:56 +0000 |
commit | 11183b4d905d14c6a0164a4d13675b89b1bf4ceb (patch) | |
tree | 8ed4d865c0f2f42b19b74cc183a43e1f2ff9513a /modules/textual_inversion | |
parent | e452facef476342af30ab7c0d510f715c6ae9ea0 (diff) | |
download | stable-diffusion-webui-gfx803-11183b4d905d14c6a0164a4d13675b89b1bf4ceb.tar.gz stable-diffusion-webui-gfx803-11183b4d905d14c6a0164a4d13675b89b1bf4ceb.tar.bz2 stable-diffusion-webui-gfx803-11183b4d905d14c6a0164a4d13675b89b1bf4ceb.zip |
fix for #6700
Diffstat (limited to 'modules/textual_inversion')
-rw-r--r-- | modules/textual_inversion/dataset.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textual_inversion/dataset.py b/modules/textual_inversion/dataset.py index 1568b2b8..af9fbcf2 100644 --- a/modules/textual_inversion/dataset.py +++ b/modules/textual_inversion/dataset.py @@ -115,7 +115,7 @@ class PersonalizedBase(Dataset): weight /= weight.mean()
elif use_weight:
#If an image does not have a alpha channel, add a ones weight map anyway so we can stack it later
- weight = torch.ones([channels] + latent_size)
+ weight = torch.ones(latent_sample.shape)
else:
weight = None
|