comfyanonymous / ComfyUI

The most powerful and modular stable diffusion GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
42.42k stars 4.48k forks source link

'NoneType' object is not subscriptable #2528

Open eyalgi11 opened 6 months ago

eyalgi11 commented 6 months ago

Error occurred when executing PreviewImage: 'NoneType' object is not subscriptable

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\nodes.py", line 1415, in save_images full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0])



hi there i get this error from this workflow:
[workflow.json](https://github.com/comfyanonymous/ComfyUI/files/13917762/workflow.json)

workflow is from: https://www.reddit.com/r/comfyui/comments/17qec73/sillytavern_character_expression_workflow/
there is tutorial there on how to use

i using windows, rtx 3090, i7
if there is anything more i need to supply just ask
thank you for your help :)
poisenbery commented 6 months ago

You're getting a nonetype error with the save_image function, which means the save image node is not receiving the input it expects.

Have you attempted to investigate what is being passed through that socket?

eyalgi11 commented 6 months ago

sorry for my ignorance but i don't know what is socket, and how to check it in comfyui with this workflow

RyzeNGrind commented 6 months ago

I am receiving a very similar error

Error occurred when executing PreviewImage:

'NoneType' object is not subscriptable

File "C:\Users\<redacted>\pinokio\api\comfyui.pinokio.git\ComfyUI\execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "C:\Users\<redacted>\pinokio\api\comfyui.pinokio.git\ComfyUI\execution.py", line 85, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "C:\Users\<redacted>\pinokio\api\comfyui.pinokio.git\ComfyUI\execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "C:\Users\<redacted>\pinokio\api\comfyui.pinokio.git\ComfyUI\nodes.py", line 1415, in save_images
full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0])

W10, RTX4090 24GBVRAM, i7-12700K, 32GB DDR5, Using Pinokio to 1 click run Comfy-UI.

I used a simpler workflow of mine and i have no issues, but when i use a complex workflow it seems I have the exact same error and my workflow crashes. Any help or guidance would be greatly appreciated.

vivekchakraverty commented 1 week ago

I am using the portable ComfyUI. I am getting a similar error after substituting missing nodes with relevant ones from the following workflow:

https://openart.ai/workflows/guppy_each_15/change-pose/CeuZsuI2io4oINRGwl1P

My error is:

Error occurred when executing PreviewImage:

'NoneType' object is not subscriptable

File "C:\new_ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\new_ComfyUI_windows_portable_nvidia_cu121_or_cpu\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:\new_ComfyUI_windows_portable_nvidia_cu121_or_cpu\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:\new_ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1431, in save_images full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0])