Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLIPSeg tuple index out of range #48

Open
surinnin2 opened this issue Jun 12, 2024 · 2 comments
Open

CLIPSeg tuple index out of range #48

surinnin2 opened this issue Jun 12, 2024 · 2 comments

Comments

@surinnin2
Copy link

I got the following error when trying to run the PuLID_refiner workflow on comfyui deployed on a lightning.ai workspace. The CLIPSeg values were: prompt=face, threshold=0.40, smooth=21, dilate=2, blur=23.

Error occurred when executing ApplyCLIPSeg+:

tuple index out of range

File "/teamspace/studios/this_studio/ComfyUI/execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/teamspace/studios/this_studio/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 "/teamspace/studios/this_studio/ComfyUI/execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/teamspace/studios/this_studio/ComfyUI/custom_nodes/ComfyUI_essentials/segmentation.py", line 64, in execute
outputs = T.functional.gaussian_blur(outputs, smooth)
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torchvision/transforms/v2/functional/_misc.py", line 81, in gaussian_blur
return kernel(inpt, kernel_size=kernel_size, sigma=sigma)
File "/home/zeus/miniconda3/envs/cloudspace/lib/python3.10/site-packages/torchvision/transforms/v2/functional/_misc.py", line 146, in gaussian_blur_image
kernel = kernel.expand(shape[-3], 1, kernel.shape[0], kernel.shape[1])

When I tried the same job locally it worked fine. I know this might be a problem with the environment, but if you have any ideas or suggestions I'd greatly appreciate it.

@cubiq
Copy link
Owner

cubiq commented Jun 12, 2024

hard to say, they might just have an outdated version or outdated dependency

@ordin2342
Copy link

Same issue since couple of days (locally). Worked fine before. No idea what''s the cause, same workflow I've been using for weeks.

Loading 1 new model
100%|████████████████████████████████████████████████████████████████████████████████████████████████████| 42/42 [00:09<00:00,  4.46it/s]
Face Analysis: value: 0.5144070088863373, normalized: 0.7564808954210842
!!! Exception during processing!!! tuple index out of range
Traceback (most recent call last):
  File "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\ComfyUI_windows_portable\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 "C:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_essentials\segmentation.py", line 64, in execute
    outputs = T.functional.gaussian_blur(outputs, smooth)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torchvision\transforms\v2\functional\_misc.py", line 83, in gaussian_blur
    return kernel(inpt, kernel_size=kernel_size, sigma=sigma)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torchvision\transforms\v2\functional\_misc.py", line 148, in gaussian_blur_image
    kernel = kernel.expand(shape[-3], 1, kernel.shape[0], kernel.shape[1])
                           ~~~~~^^^^
IndexError: tuple index out of range

Tried reinstalling essentials and other packages that might be related, tried updating what's possible. This is a weird one... all help appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants