Fixes #39: checks if text is a tuple and converts it to a string

This commit is contained in:
Krenar Shabani
2024-08-25 17:13:53 -04:00
parent 9fd71b017a
commit cf083531d5
+2
View File
@@ -72,6 +72,8 @@ def _extract_embedding_names(text, input_data):
tokenizer = tokenizer.clip_h
elif isinstance(tokenizer, SDXLTokenizer):
tokenizer = tokenizer.clip_l
if not isinstance(text,str):
text = "".join(str(item) if item is not None else "" for item in text)
text = escape_important(text)
parsed_weights = token_weights(text, 1.0)