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

LayerUtility: LaMa 'cvtColor' error #470

Open
BillRen123 opened this issue Jan 2, 2025 · 1 comment
Open

LayerUtility: LaMa 'cvtColor' error #470

BillRen123 opened this issue Jan 2, 2025 · 1 comment

Comments

@BillRen123
Copy link

ComfyUI Error Report

Error Details

  • Node ID: 12
  • Node Type: LayerUtility: LaMa
  • Exception Type: cv2.error
  • Exception Message: OpenCV(4.10.0) /io/opencv/modules/imgproc/src/color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

Stack Trace

  File "/home/renyujing/ryj/ComfyUI/execution.py", line 324, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "/home/renyujing/ryj/ComfyUI/execution.py", line 199, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

  File "/home/renyujing/ryj/ComfyUI/execution.py", line 170, in _map_node_over_list
    process_inputs(input_dict, i)

  File "/home/renyujing/ryj/ComfyUI/execution.py", line 159, in process_inputs
    results.append(getattr(obj, func)(**inputs))

  File "/home/renyujing/ryj/ComfyUI/custom_nodes/ComfyUI_LayerStyle_Advance/py/lama.py", line 113, in lama
    cli.run(model=lama_model, device=device, image=Path(image_dir), mask=Path(mask_dir), output=Path(result_dir), config=Path(config_dir))

  File "/home/renyujing/ryj/ComfyUI/custom_nodes/ComfyUI_LayerStyle_Advance/py/iopaint/cli.py", line 91, in run
    batch_inpaint(model, device, image, mask, output, config, concat)

  File "/home/renyujing/ryj/ComfyUI/custom_nodes/ComfyUI_LayerStyle_Advance/py/iopaint/batch_processing.py", line 96, in batch_inpaint
    img = cv2.cvtColor(img, cv2.COLOR_BGRA2RGB)

System Information

  • ComfyUI Version: v0.3.6-14-g9a616b81
  • Arguments: main.py
  • OS: posix
  • Python Version: 3.10.15 | packaged by conda-forge | (main, Sep 30 2024, 17:51:04) [GCC 13.3.0]
  • Embedded Python: false
  • PyTorch Version: 2.4.1+cu124

Devices

  • Name: cuda:0 NVIDIA GeForce RTX 3090 : cudaMallocAsync
    • Type: cuda
    • VRAM Total: 25438126080
    • VRAM Free: 24694751232
    • Torch VRAM Total: 67108864
    • Torch VRAM Free: 33554432

Logs

2025-01-02T11:23:55.726722 - Prompt executed in 5.99 seconds
2025-01-02T11:30:25.793538 - got prompt
2025-01-02T11:30:25.824256 - # 😺dzNodes: LayerStyle -> �[1;33mlama copy�[m2025-01-02T11:30:25.824741 -
2025-01-02T11:30:25.959406 - # 😺dzNodes: LayerStyle -> �[1;33mconfig file written: /home/renyujing/ryj/ComfyUI/temp/_lama_y5p002dmqfbe47ab_temp/config.json�[m2025-01-02T11:30:25.959467 -
2025-01-02T11:30:29.370890 - 2025-01-02 11:30:29.370 | INFO | ComfyUI_LayerStyle_Advance.py.iopaint.model_manager:init_model:38 - Loading model: lama
2025-01-02T11:30:29.371094 - 2025-01-02 11:30:29.370 | INFO | ComfyUI_LayerStyle_Advance.py.iopaint.helper:load_jit_model:109 - Loading model from: /home/renyujing/ryj/ComfyUI/models/lama/big-lama.pt
2025-01-02T11:30:29.973145 - ⠋ Batch processing... 0% 0/1 0:00:002025-01-02T11:30:29.973291 -
2025-01-02T11:30:29.974759 - !!! Exception during processing !!! OpenCV(4.10.0) /io/opencv/modules/imgproc/src/color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

2025-01-02T11:30:29.975032 - Traceback (most recent call last):
File "/home/renyujing/ryj/ComfyUI/execution.py", line 324, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/home/renyujing/ryj/ComfyUI/execution.py", line 199, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "/home/renyujing/ryj/ComfyUI/execution.py", line 170, in _map_node_over_list
process_inputs(input_dict, i)
File "/home/renyujing/ryj/ComfyUI/execution.py", line 159, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "/home/renyujing/ryj/ComfyUI/custom_nodes/ComfyUI_LayerStyle_Advance/py/lama.py", line 113, in lama
cli.run(model=lama_model, device=device, image=Path(image_dir), mask=Path(mask_dir), output=Path(result_dir), config=Path(config_dir))
File "/home/renyujing/ryj/ComfyUI/custom_nodes/ComfyUI_LayerStyle_Advance/py/iopaint/cli.py", line 91, in run
batch_inpaint(model, device, image, mask, output, config, concat)
File "/home/renyujing/ryj/ComfyUI/custom_nodes/ComfyUI_LayerStyle_Advance/py/iopaint/batch_processing.py", line 96, in batch_inpaint
img = cv2.cvtColor(img, cv2.COLOR_BGRA2RGB)
cv2.error: OpenCV(4.10.0) /io/opencv/modules/imgproc/src/color.cpp:196: error: (-215:Assertion failed) !_src.empty() in function 'cvtColor'

2025-01-02T11:30:29.975348 - Prompt executed in 4.16 seconds

@chflame163
Copy link
Owner

It seems that is issue with the input image, maybe it is None?

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

2 participants