Commit 08066676 authored by AUTOMATIC's avatar AUTOMATIC
Browse files

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

parent 79e39fae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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