[GH-ISSUE #1330] Installing insightface #551

Closed
opened 2026-10-27 21:18:53 +00:00 by bsakaguchi · 6 comments
Owner

Originally created by @LichAcademy on GitHub (Dec 15, 2024).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/1330

Could this be the manager issue? Report is below.

image

ComfyUI Error Report

Error Details

  • Node ID: 60
  • Node Type: IPAdapterInsightFaceLoader
  • Exception Type: Exception
  • Exception Message: Unable to import dependency onnxruntime.

Stack Trace

  File "C:\Users\professorlich\AI_projects\ComfyMin\execution.py", line 323, 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 "C:\Users\professorlich\AI_projects\ComfyMin\execution.py", line 198, 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 "C:\Users\professorlich\AI_projects\ComfyMin\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "C:\Users\professorlich\AI_projects\ComfyMin\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\professorlich\AI_projects\ComfyMin\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 674, in load_insightface
    return (insightface_loader(provider, model_name=model_name),)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "C:\Users\professorlich\AI_projects\ComfyMin\custom_nodes\ComfyUI_IPAdapter_plus\utils.py", line 161, in insightface_loader
    raise Exception(e)

System Information

  • ComfyUI Version: v0.3.7-31-ge83063b
  • Arguments: main.py
  • OS: nt
  • Python Version: 3.12.8 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 16:48:34) [MSC v.1929 64 bit (AMD64)]
  • Embedded Python: false
  • PyTorch Version: 2.5.1+cu124

Devices

  • Name: cuda:0 NVIDIA GeForce RTX 4060 Ti : cudaMallocAsync
    • Type: cuda
    • VRAM Total: 17175019520
    • VRAM Free: 13922721588
    • Torch VRAM Total: 2013265920
    • Torch VRAM Free: 13360948

This seems to trigger it:

github.com/deepinsight/insightface@4aa1a40b1f/python-package/insightface/init.py#L8

IP Adapter custom nodes do not have requirements.txt. I have installed insightface models using the manager. Was manager meant to install onnxruntime in the process as well?

I know I can try pip install onnxruntime, but just thought I'd report it. Environment is new and minimalistic, everything is up to date, and I only have the following nodes:

image

If this is not related to the manager, I apologise, 🙏 feel free to close the issue, I will reach out to cubiq. 👍

Originally created by @LichAcademy on GitHub (Dec 15, 2024). Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/1330 Could this be the manager issue? Report is below. ![image](https://github.com/user-attachments/assets/8c5033f0-20ff-4d5e-b50d-6db7b6342e8d) # ComfyUI Error Report ## Error Details - **Node ID:** 60 - **Node Type:** IPAdapterInsightFaceLoader - **Exception Type:** Exception - **Exception Message:** Unable to import dependency onnxruntime. ## Stack Trace ``` File "C:\Users\professorlich\AI_projects\ComfyMin\execution.py", line 323, 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 "C:\Users\professorlich\AI_projects\ComfyMin\execution.py", line 198, 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 "C:\Users\professorlich\AI_projects\ComfyMin\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "C:\Users\professorlich\AI_projects\ComfyMin\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\professorlich\AI_projects\ComfyMin\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 674, in load_insightface return (insightface_loader(provider, model_name=model_name),) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\professorlich\AI_projects\ComfyMin\custom_nodes\ComfyUI_IPAdapter_plus\utils.py", line 161, in insightface_loader raise Exception(e) ``` ## System Information - **ComfyUI Version:** v0.3.7-31-ge83063b - **Arguments:** main.py - **OS:** nt - **Python Version:** 3.12.8 | packaged by Anaconda, Inc. | (main, Dec 11 2024, 16:48:34) [MSC v.1929 64 bit (AMD64)] - **Embedded Python:** false - **PyTorch Version:** 2.5.1+cu124 ## Devices - **Name:** cuda:0 NVIDIA GeForce RTX 4060 Ti : cudaMallocAsync - **Type:** cuda - **VRAM Total:** 17175019520 - **VRAM Free:** 13922721588 - **Torch VRAM Total:** 2013265920 - **Torch VRAM Free:** 13360948 This seems to trigger it: https://github.com/deepinsight/insightface/blob/4aa1a40b1f35633608e14e173d0f99f0f667321c/python-package/insightface/__init__.py#L8 IP Adapter custom nodes do not have `requirements.txt`. I have installed insightface models using the manager. Was manager meant to install `onnxruntime` in the process as well? I know I can try `pip install onnxruntime`, but just thought I'd report it. Environment is new and minimalistic, everything is up to date, and I only have the following nodes: ![image](https://github.com/user-attachments/assets/227b685f-f41c-4a36-a72a-6199fc565ecf) If this is not related to the manager, I apologise, 🙏 feel free to close the issue, I will reach out to cubiq. 👍
Author
Owner

@ltdrdata commented on GitHub (Dec 15, 2024):

click the Try Fix for IPAdapter_plus custom node.
and restart the ComfyUI.
If the issue is persist then post the generated comfyui.log file.

<!-- gh-comment-id:2543447150 --> @ltdrdata commented on GitHub (Dec 15, 2024): click the `Try Fix` for IPAdapter_plus custom node. and restart the ComfyUI. If the issue is persist then post the generated `comfyui.log` file.
Author
Owner

@LichAcademy commented on GitHub (Dec 15, 2024):

Fix Node (Recreate) option did not do anything after restarting comfy (other than resized the node).

Log attached.

comfyui.log

<!-- gh-comment-id:2543450927 --> @LichAcademy commented on GitHub (Dec 15, 2024): `Fix Node (Recreate)` option did not do anything after restarting comfy (other than resized the node). Log attached. [comfyui.log](https://github.com/user-attachments/files/18138932/comfyui.log)
Author
Owner

@LichAcademy commented on GitHub (Dec 15, 2024):

Let me also add the list of installed packages (pip list).

list.log

<!-- gh-comment-id:2543452641 --> @LichAcademy commented on GitHub (Dec 15, 2024): Let me also add the list of installed packages (`pip list`). [list.log](https://github.com/user-attachments/files/18138979/list.log)
Author
Owner

@LichAcademy commented on GitHub (Dec 15, 2024):

Upon running pip install onnxruntime, node works fine. 👍

To non-programmers who may be reading, make sure to activate your virtual environment (venv or conda) before running this command.

<!-- gh-comment-id:2543478719 --> @LichAcademy commented on GitHub (Dec 15, 2024): Upon running `pip install onnxruntime`, node works fine. 👍 To non-programmers who may be reading, make sure to activate your virtual environment (venv or conda) before running this command.
Author
Owner

@ltdrdata commented on GitHub (Dec 15, 2024):

Fix Node (Recreate) option did not do anything after restarting comfy (other than resized the node).

Log attached.

comfyui.log

Oh... What I meant was the Try Fix button in the node list.
But it seems your situation wasn't related to an import fail.

<!-- gh-comment-id:2543899383 --> @ltdrdata commented on GitHub (Dec 15, 2024): > `Fix Node (Recreate)` option did not do anything after restarting comfy (other than resized the node). > > Log attached. > > [comfyui.log](https://github.com/user-attachments/files/18138932/comfyui.log) Oh... What I meant was the `Try Fix` button in the node list. But it seems your situation wasn't related to an import fail.
Author
Owner

@LichAcademy commented on GitHub (Dec 15, 2024):

Oh sorry, it seems I misunderstood you. 🙏 I'm still getting the hang of the new front end, sorry about that.

It is a mystery that onnxruntime wasn't installed, given that comfy+manager+ipadapter are all in a brand-new environment from 2 days ago... 🤔 Nonetheless, if this is unrelated to the manager, then sorry for the hassle. I will check with cubiq, in case something went wrong with one of his dependencies.

Thank you for a prompt response, much appreciated. 👍

<!-- gh-comment-id:2543907607 --> @LichAcademy commented on GitHub (Dec 15, 2024): Oh sorry, it seems I misunderstood you. 🙏 I'm still getting the hang of the new front end, sorry about that. It is a mystery that `onnxruntime` wasn't installed, given that comfy+manager+ipadapter are all in a brand-new environment from 2 days ago... 🤔 Nonetheless, if this is unrelated to the manager, then sorry for the hassle. I will check with cubiq, in case something went wrong with one of his dependencies. Thank you for a prompt response, much appreciated. 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/ComfyUI-Manager#551
No description provided.