Description
Encountered an error while executing the GuidedFilter(FaceParsing) node within a workflow shared in another post, which includes a comparison operation. It's unclear what should be provided in the guide input of that node. Also, what is the version of opencv-contrib-python to be used? In the requirements.txt there is no version therefore the latest is installing (4.9.0.80).
Error Message:
The following error message is received when executing the node:
Error occurred when executing GuidedFilter(FaceParsing):
module 'cv2.ximgproc' has no attribute 'guidedFilter'
Traceback (most recent call last):
File "M:\AIgenerated\StableDiffusion\ComfyUI2\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "M:\AIgenerated\StableDiffusion\ComfyUI2\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "M:\AIgenerated\StableDiffusion\ComfyUI2\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "M:\AIgenerated\StableDiffusion\ComfyUI2\custom_nodes\comfyui_face_parsing\face_parsing_nodes.py", line 923, in guided_filter
result_cv2 = cv2.ximgproc.guidedFilter(guide_cv2, image_cv2, radius, eps)
AttributeError: module 'cv2.ximgproc' has no attribute 'guidedFilter'
Console output:
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
File "M:\AIgenerated\StableDiffusion\ComfyUI2\execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "M:\AIgenerated\StableDiffusion\ComfyUI2\execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "M:\AIgenerated\StableDiffusion\ComfyUI2\execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "M:\AIgenerated\StableDiffusion\ComfyUI2\custom_nodes\comfyui_face_parsing\face_parsing_nodes.py", line 923, in guided_filter
result_cv2 = cv2.ximgproc.guidedFilter(guide_cv2, image_cv2, radius, eps)
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'cv2.ximgproc' has no attribute 'guidedFilter'
Prompt executed in 0.05 seconds
Environment
ComfyUI version: (specify the version if known)
Python version: 3.11.6
CUDA/CuDNN version: cudnn 12.1
Hardware specs:
VRAM: 24563 MB
RAM: 32693 MB
GPU: NVIDIA GeForce RTX 4090
Additional Libraries:
torch: 2.1.2+cu121
torchaudio: 2.1.2+cu121
torchmetrics: 1.3.0.post0
torchsde: 0.2.6
torchvision: 0.16.2+cu121
xformers: 0.0.23.post1
opencv-contrib-python: 4.9.0.80
opencv-python: 4.9.0.80
opencv-python-headless: 4.7.0.72
Steps to Reproduce
-Normal installation of ComfyUI (non-portable version).
-Execute the GuidedFilter(FaceParsing) node with the mentioned configuration.
-Encounter the attribute error regarding 'cv2.ximgproc'.
Expected Behavior
GuidedFilter should execute without errors, processing the inputs as intended.
Actual Behavior
The execution fails due to the missing 'guidedFilter' attribute in 'cv2.ximgproc'.