aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-01-07 04:22:07 +0000
committerAUTOMATIC <16777216c@gmail.com>2023-01-07 04:22:07 +0000
commit08066676a47b560235d4c085dd3cfcb470b80997 (patch)
treefd32ce3ed2ac3aebef97993b3c8b3dda1b78018b
parent79e39fae6110c20a3ee6255e2841c877f65e8cbd (diff)
downloadstable-diffusion-webui-gfx803-08066676a47b560235d4c085dd3cfcb470b80997.tar.gz
stable-diffusion-webui-gfx803-08066676a47b560235d4c085dd3cfcb470b80997.tar.bz2
stable-diffusion-webui-gfx803-08066676a47b560235d4c085dd3cfcb470b80997.zip
make it not break on empty inputs; thank you tarded, we are
-rw-r--r--modules/sd_hijack_clip.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/sd_hijack_clip.py b/modules/sd_hijack_clip.py
index ac3020d7..16aef76a 100644
--- a/modules/sd_hijack_clip.py
+++ b/modules/sd_hijack_clip.py
@@ -147,7 +147,7 @@ class FrozenCLIPEmbedderWithCustomWordsBase(torch.nn.Module):
chunk.multipliers += [weight] * emb_len
position += embedding_length_in_tokens
- if len(chunk.tokens) > 0:
+ if len(chunk.tokens) > 0 or len(chunks) == 0:
next_chunk()
return chunks, token_count