Closed formulake closed 5 months ago
This should now work.
Like a charm! Thank you!
Facing the same issue :( everything is up-to-date. I am using torch 2.4 cu124 with python 3.12. I have tried with both CLIPTextEncodeSDXLRefiner and CLIPTextEncode.
Error occurred when executing CLIPTextEncodeSDXLRefiner:
'list' object has no attribute 'replace'
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy_extras\nodes_clip_sdxl.py", line 19, in encode
tokens = clip.tokenize(text)
^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy\sd.py", line 131, in tokenize
return self.tokenizer.tokenize_with_weights(text, return_word_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy\sdxl_clip.py", line 30, in tokenize_with_weights
out["g"] = self.clip_g.tokenize_with_weights(text, return_word_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy\sd1_clip.py", line 416, in tokenize_with_weights
text = escape_important(text)
^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy\sd1_clip.py", line 256, in escape_important
text = text.replace("\\)", "\0\1")
^^^^^^^^^^^^
Error occurred when executing CLIPTextEncode:
'list' object has no attribute 'replace'
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\nodes.py", line 57, in encode
tokens = clip.tokenize(text)
^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy\sd.py", line 131, in tokenize
return self.tokenizer.tokenize_with_weights(text, return_word_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy\sdxl_clip.py", line 30, in tokenize_with_weights
out["g"] = self.clip_g.tokenize_with_weights(text, return_word_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy\sd1_clip.py", line 424, in tokenize_with_weights
text = escape_important(text)
^^^^^^^^^^^^^^^^^^^^^^
File "D:\AI\ComfyUI\ComfyUI_windows_portable_nightly_pytorch\ComfyUI\comfy\sd1_clip.py", line 260, in escape_important
text = text.replace("\\)", "\0\1")
^^^^^^^^^^^^
Same here
So this happens when I try to pass the caption output into a CLIP Text Encode input. What I'm trying to do is caption an image and use that prompt to generate test images with other checkpoints. I understand this may not be the intended use-case, but can anyone help with a workaround?
Full text