mirror of
https://github.com/openvinotoolkit/stable-diffusion-webui.git
synced 2024-12-14 22:53:25 +03:00
fix iterator bug for #2295
This commit is contained in:
parent
8561d5762b
commit
429442f4a6
@ -323,10 +323,10 @@ class FrozenCLIPEmbedderWithCustomWords(torch.nn.Module):
|
|||||||
|
|
||||||
tokens = []
|
tokens = []
|
||||||
multipliers = []
|
multipliers = []
|
||||||
for i in range(len(remade_batch_tokens)):
|
for j in range(len(remade_batch_tokens)):
|
||||||
if len(remade_batch_tokens[i]) > 0:
|
if len(remade_batch_tokens[j]) > 0:
|
||||||
tokens.append(remade_batch_tokens[i][:75])
|
tokens.append(remade_batch_tokens[j][:75])
|
||||||
multipliers.append(batch_multipliers[i][:75])
|
multipliers.append(batch_multipliers[j][:75])
|
||||||
else:
|
else:
|
||||||
tokens.append([self.wrapped.tokenizer.eos_token_id] * 75)
|
tokens.append([self.wrapped.tokenizer.eos_token_id] * 75)
|
||||||
multipliers.append([1.0] * 75)
|
multipliers.append([1.0] * 75)
|
||||||
|
Loading…
Reference in New Issue
Block a user