diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-01-07 04:22:07 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-01-07 04:22:07 +0000 |
commit | 08066676a47b560235d4c085dd3cfcb470b80997 (patch) | |
tree | fd32ce3ed2ac3aebef97993b3c8b3dda1b78018b | |
parent | 79e39fae6110c20a3ee6255e2841c877f65e8cbd (diff) | |
download | stable-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.py | 2 |
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
|