Commit 08066676 authored by AUTOMATIC's avatar AUTOMATIC

make it not break on empty inputs; thank you tarded, we are

parent 79e39fae
...@@ -147,7 +147,7 @@ class FrozenCLIPEmbedderWithCustomWordsBase(torch.nn.Module): ...@@ -147,7 +147,7 @@ class FrozenCLIPEmbedderWithCustomWordsBase(torch.nn.Module):
chunk.multipliers += [weight] * emb_len chunk.multipliers += [weight] * emb_len
position += embedding_length_in_tokens position += embedding_length_in_tokens
if len(chunk.tokens) > 0: if len(chunk.tokens) > 0 or len(chunks) == 0:
next_chunk() next_chunk()
return chunks, token_count return chunks, token_count
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment