diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-12 10:38:03 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-12 10:38:03 +0000 |
commit | 429442f4a6aab7301efb89d27bef524fe827e81a (patch) | |
tree | 81230cff3595a854a5821ba02ba7ceba7c0e97e9 /modules/sd_hijack.py | |
parent | 8561d5762b98bf7cfb764128ebf11633d8bb4405 (diff) | |
download | stable-diffusion-webui-gfx803-429442f4a6aab7301efb89d27bef524fe827e81a.tar.gz stable-diffusion-webui-gfx803-429442f4a6aab7301efb89d27bef524fe827e81a.tar.bz2 stable-diffusion-webui-gfx803-429442f4a6aab7301efb89d27bef524fe827e81a.zip |
fix iterator bug for #2295
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r-- | modules/sd_hijack.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 2753d4fa..c81722a0 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -323,10 +323,10 @@ class FrozenCLIPEmbedderWithCustomWords(torch.nn.Module): tokens = []
multipliers = []
- for i in range(len(remade_batch_tokens)):
- if len(remade_batch_tokens[i]) > 0:
- tokens.append(remade_batch_tokens[i][:75])
- multipliers.append(batch_multipliers[i][:75])
+ for j in range(len(remade_batch_tokens)):
+ if len(remade_batch_tokens[j]) > 0:
+ tokens.append(remade_batch_tokens[j][:75])
+ multipliers.append(batch_multipliers[j][:75])
else:
tokens.append([self.wrapped.tokenizer.eos_token_id] * 75)
multipliers.append([1.0] * 75)
|