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

ImageFilterMedianBlur won't allow to change value #39

Open
IcelandicCenterArtificialIntelligence opened this issue Jul 26, 2024 · 0 comments

Comments

@IcelandicCenterArtificialIntelligence

The node ImageFilterMedianBlur works fine only if you leave the default value 10.
If you try to change the value it will fail. Also it will only accept odd values (if you type 10, it will adjust it to 11)

This is the error:

`Error occurred when executing ImageFilterMedianBlur:

OpenCV(4.7.0) /io/opencv/modules/imgproc/src/median_blur.dispatch.cpp:285: error: (-215:Assertion failed) (ksize % 2 == 1) && (_src0.dims() <= 2 ) in function 'medianBlur'

File "/workspace/ComfyUI/execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/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 "/workspace/ComfyUI/execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/ComfyUI/custom_nodes/ComfyUI-Allor/modules/ImageFilter.py", line 242, in node
return ((cv2_layer(img, lambda x: cv2.medianBlur(x, size)) / 255),)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/ComfyUI/custom_nodes/ComfyUI-Allor/modules/Utils.py", line 68, in cv2_layer
return torch.stack([
^
File "/workspace/ComfyUI/custom_nodes/ComfyUI-Allor/modules/Utils.py", line 69, in
produce(tensor[i]) for i in range(len(tensor))
^^^^^^^^^^^^^^^^^^
File "/workspace/ComfyUI/custom_nodes/ComfyUI-Allor/modules/Utils.py", line 54, in produce
result_rgb = function(rgb)
^^^^^^^^^^^^^
File "/workspace/ComfyUI/custom_nodes/ComfyUI-Allor/modules/ImageFilter.py", line 242, in
return ((cv2_layer(img, lambda x: cv2.medianBlur(x, size)) / 255),)
^^^^^^^^^^^^^^^^^^^^^^^`

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

1 participant