Merge pull request #40 from KrenarShabani/bugfix-issue-39
Fixes #39: checks if text is a tuple and converts it to a string
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user