WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.15k stars 170 forks source link

"Mask Fill Holes" node doesn't work batched #394

Open SharkWipf opened 4 months ago

SharkWipf commented 4 months ago

As per the title, the "Mask Fill Holes" node doesn't seem to work with batched inputs. Attempting to do so throws an error:

Error occurred when executing Mask Fill Holes:

Too many dimensions: 3 > 2.

File "/home/sebastiaan/src/ComfyUI/execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/home/sebastiaan/src/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 "/home/sebastiaan/src/ComfyUI/execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/home/sebastiaan/src/ComfyUI/custom_nodes/was-node-suite-comfyui/WAS_Node_Suite.py", line 8187, in fill_region
pil_image = Image.fromarray(mask_np, mode="L")
File "/home/sebastiaan/.conda/envs/comfyui/lib/python3.10/site-packages/PIL/Image.py", line 3103, in fromarray
raise ValueError(msg)

It works fine without batching. Workflow (generated preview image is from when I bypassed the node): image

Might be related to #229.

Today's my first time using ComfyUI and thus WAS, so I might simply be messing something up, but it feels like I've hit a bug to me.

WAS-PlaiLabs commented 4 months ago

Yeah, these nodes aren't batched unfortunately. They are really old, but I have a solution for these coming soon.