SytanSD / Sytan-SDXL-ComfyUI

A hub dedicated to development and upkeep of the Sytan SDXL workflow for ComfyUI
GNU General Public License v3.0
413 stars 19 forks source link

Fails to start then gives error #4

Open Ziov opened 1 year ago

Ziov commented 1 year ago

Comfyui gives and error at the start with this script, I get an error about every model in the dir but then starts. After that it starts and gives this error.

Error occurred when executing CLIPTextEncodeSDXL:

list indices must be integers or slices, not str

File "\ComfyUI_windows_portable\ComfyUI\execution.py", line 145, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "\ComfyUI_windows_portable\ComfyUI\execution.py", line 68, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_clip_sdxl.py", line 43, in encode
tokens["l"] = clip.tokenize(text_l)["l"]
SytanSD commented 1 year ago

So sorry for the late response, I just upgraded my PC and needed to find a way to get back into my account after getting everything sorted out.

As for this issue, I am not sure I have ever seen it before.

Looks like maybe you need to update your comfy for proper support for the newly added SDXL specific CLIP nodes. Please let me know if that helps, and I am sorry if it doesn't

acookienot commented 1 year ago

This happens to me when trying to use Realistic Vision V5.1

garacio777 commented 11 months ago

Hi, I got the same problem..

occurred when executing CLIPTextEncodeSDXL:

list indices must be integers or slices, not str

File "C:\Users\andre\Desktop\comfyui\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\andre\Desktop\comfyui\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\andre\Desktop\comfyui\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\andre\Desktop\comfyui\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_clip_sdxl.py", line 43, in encode tokens["l"] = clip.tokenize(text_l)["l"]

patrickmros commented 11 months ago

Have someone found a solution to this yet?

garacio777 commented 11 months ago

Have someone found a solution to this yet?

Yes... It was something to do with downloading extra files and putting in right directory.. I guess it's something to do with clip...

DarceyLloyd commented 11 months ago

I get this problem also, no fix.

Error occurred when executing CLIPTextEncodeSDXL:

list indices must be integers or slices, not str

File "C:\ComfyUI\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI\ComfyUI\comfy_extras\nodes_clip_sdxl.py", line 43, in encode tokens["l"] = clip.tokenize(text_l)["l"]

halninethousand commented 9 months ago

File "C:\Users\Zhaba\Desktop\Data\Packages\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\Users\Zhaba\Desktop\Data\Packages\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:\Users\Zhaba\Desktop\Data\Packages\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "C:\Users\Zhaba\Desktop\Data\Packages\ComfyUI\comfy_extras\nodes_clip_sdxl.py", line 44, in encode if len(tokens["l"]) != len(tokens["g"]): KeyError: 'g'

sachin-detrax commented 8 months ago

solution - use sdxl model

I tried first with sd1.5 model and got this error -

 File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 154, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 84, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 77, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_clip_sdxl.py", line 44, in encode
    if len(tokens["l"]) != len(tokens["g"]):
                               ~~~~~~^^^^^

but when i used sdxl model it worked and as the node name suggests - CLIPTextEncodeSDXL

sachin-detrax commented 8 months ago

File "C:\Users\Zhaba\Desktop\Data\Packages\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "C:\Users\Zhaba\Desktop\Data\Packages\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "C:\Users\Zhaba\Desktop\Data\Packages\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "C:\Users\Zhaba\Desktop\Data\Packages\ComfyUI\comfy_extras\nodes_clip_sdxl.py", line 44, in encode if len(tokens["l"]) != len(tokens["g"]): KeyError: 'g'

use sdxl model