Acly / comfyui-inpaint-nodes

Nodes for better inpainting with ComfyUI: Fooocus inpaint model for SDXL, LaMa, MAT, and various other tools for pre-filling inpaint & outpaint areas.
GNU General Public License v3.0
490 stars 35 forks source link

RuntimeError: shape '[1, 1, 1408, 938]' is invalid for input of size 21131264 #17

Closed jinnaluo0 closed 4 months ago

jinnaluo0 commented 4 months ago

In a workflow, I used this node “LoadImagesFromDir //Inspire” to passed in multiple images. When running to the node "INPAINT_InpaintWithModel", an error occurred:

图像擦除_fooocus_seg 2.json

ERROR:root:!!! Exception during processing !!! ERROR:root:Traceback (most recent call last): File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\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 "D:\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 "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-inpaint-nodes\nodes.py", line 343, in inpaint image, mask = to_torch(image, mask) ^^^^^^^^^^^^^^^^^^^^^ File "D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-inpaint-nodes\util.py", line 13, in to_torch mask = mask.reshape(1, 1, mask.shape[-2], mask.shape[-1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: shape '[1, 1, 1408, 938]' is invalid for input of size 21131264

Prompt executed in 59.13 seconds

Acly commented 4 months ago

This looks like an older version, does it still happen with latest update?

jinnaluo0 commented 4 months ago

After updating the plugin, the error was eliminated