[GH-ISSUE #59] Can't install custom node #34

Closed
opened 2026-10-27 21:12:10 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @johndgriffin1 on GitHub (Aug 10, 2023).
Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/59

When I try to install ComfyUI roop, ReActor Node 0.1.0 for ComfyUI or FaceSwap I get an error like this and cannot use their nodes.

This particular error message is what I get when trying to install roop

D:\ai\image-generation\comfyui5\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
** ComfyUI start up time: 2023-08-10 21:14:07.656743

Prestartup times for custom nodes:
   0.0 seconds: D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 8188 MB, total RAM 15608 MB
xformers version: 0.0.20
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4060 Laptop GPU : cudaMallocAsync
Using xformers cross attention
### Loading: ComfyUI-Manager (V0.21)
### ComfyUI Revision: 1271 [f7e6a5ed]
Traceback (most recent call last):
  File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1647, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop\__init__.py", line 24, in <module>
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop\nodes.py", line 3, in <module>
    from scripts.faceswap import FaceSwapScript, get_models
  File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop\scripts\faceswap.py", line 16, in <module>
    from scripts.swapper import UpscaleOptions, swap_face, ImageResult
  File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop\scripts\swapper.py", line 12, in <module>
    import insightface
ModuleNotFoundError: No module named 'insightface'

Cannot import D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop module for custom nodes: No module named 'insightface'

Import times for custom nodes:
   0.4 seconds (IMPORT FAILED): D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop
   0.7 seconds: D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager

Starting server

To see the GUI go to: http://127.0.0.1:8188
Originally created by @johndgriffin1 on GitHub (Aug 10, 2023). Original GitHub issue: https://github.com/Comfy-Org/ComfyUI-Manager/issues/59 When I try to install [ComfyUI roop](https://github.com/ssitu/ComfyUI_roop), [ReActor Node 0.1.0 for ComfyUI](https://github.com/Gourieff/comfyui-reactor-node) or [FaceSwap](https://github.com/imb101/ComfyUI-FaceSwap) I get an error like this and cannot use their nodes. This particular error message is what I get when trying to install roop ``` D:\ai\image-generation\comfyui5\ComfyUI_windows_portable>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build ** ComfyUI start up time: 2023-08-10 21:14:07.656743 Prestartup times for custom nodes: 0.0 seconds: D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager Total VRAM 8188 MB, total RAM 15608 MB xformers version: 0.0.20 Set vram state to: NORMAL_VRAM Device: cuda:0 NVIDIA GeForce RTX 4060 Laptop GPU : cudaMallocAsync Using xformers cross attention ### Loading: ComfyUI-Manager (V0.21) ### ComfyUI Revision: 1271 [f7e6a5ed] Traceback (most recent call last): File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1647, in load_custom_node module_spec.loader.exec_module(module) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop\__init__.py", line 24, in <module> from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop\nodes.py", line 3, in <module> from scripts.faceswap import FaceSwapScript, get_models File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop\scripts\faceswap.py", line 16, in <module> from scripts.swapper import UpscaleOptions, swap_face, ImageResult File "D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop\scripts\swapper.py", line 12, in <module> import insightface ModuleNotFoundError: No module named 'insightface' Cannot import D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop module for custom nodes: No module named 'insightface' Import times for custom nodes: 0.4 seconds (IMPORT FAILED): D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_roop 0.7 seconds: D:\ai\image-generation\comfyui5\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager Starting server To see the GUI go to: http://127.0.0.1:8188 ```
Author
Owner

@alexbofa commented on GitHub (Aug 14, 2023):

Hello, you need install module "Insightface"

  1. Close all consoles
  2. Download file insightface-0.7.3-cp310-cp310-win_amd64.whl
  3. And put that file ..\ComfyUI\custom_nodes\comfyui-reactor-node
  4. In ..\ComfyUI\custom_nodes\comfyui-reactor-node\requirements.txt
    You need change text and save
insightface-0.7.3-cp310-cp310-win_amd64.whl
onnx==1.14.0
onnxruntime==1.15.0
opencv-python>=4.7.0.72
  1. Start this .bat ..\ComfyUI\custom_nodes\comfyui-reactor-node\install.bat

See that instruction

<!-- gh-comment-id:1677700602 --> @alexbofa commented on GitHub (Aug 14, 2023): Hello, you need install module "Insightface" 1. Close all consoles 2. Download file [insightface-0.7.3-cp310-cp310-win_amd64.whl](https://github.com/melMass/comfy_mtb/releases/download/v0.1.3/insightface-0.7.3-cp310-cp310-win_amd64.whl) 3. And put that file `..\ComfyUI\custom_nodes\comfyui-reactor-node` 4. In `..\ComfyUI\custom_nodes\comfyui-reactor-node\requirements.txt` You need change text and save ``` insightface-0.7.3-cp310-cp310-win_amd64.whl onnx==1.14.0 onnxruntime==1.15.0 opencv-python>=4.7.0.72 ``` 5. Start this .bat `..\ComfyUI\custom_nodes\comfyui-reactor-node\install.bat` See that [instruction](https://github.com/Gourieff/comfyui-reactor-node#installation)
Author
Owner

@gxbsyxh commented on GitHub (Nov 21, 2023):

about, (IMPORT FAILED): D:\ComfyUI_windows_portable\ comfyui \custom_nodes\comfyui-reactor-node
After half a month, I finally found the problem and made a record for my later friends.
opencv-python==4.7.0 version too new will cause (IMPORT FAILED)
Use the following cmd command to uninstall the original version and install the older version
Under the cmd command D:\ComfyUI_windows_portable22\python_embeded enter:
python.exe -m pip uninstall opencv-python
Reinstall the old version
python.exe -m pip install opencv-python==4.7.0.68
Below are the version numbers I looked up, which may need to be tried one by one
opencv-python==4.7.0 (from versions: 3.4.0.14, 3.4.10.37 3.4.11.41, 3.4.11.43 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38 4.4.0.40, 4.4.0.42 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66 4.7.0.68, 4.7.0.72 4.8.0.74, 4.8.0.76 4.8.1.78)

<!-- gh-comment-id:1820758805 --> @gxbsyxh commented on GitHub (Nov 21, 2023): about, (IMPORT FAILED): D:\ComfyUI_windows_portable\ comfyui \custom_nodes\comfyui-reactor-node After half a month, I finally found the problem and made a record for my later friends. opencv-python==4.7.0 version too new will cause (IMPORT FAILED) Use the following cmd command to uninstall the original version and install the older version Under the cmd command D:\ComfyUI_windows_portable22\python_embeded enter: python.exe -m pip uninstall opencv-python Reinstall the old version python.exe -m pip install opencv-python==4.7.0.68 Below are the version numbers I looked up, which may need to be tried one by one opencv-python==4.7.0 (from versions: 3.4.0.14, 3.4.10.37 3.4.11.41, 3.4.11.43 3.4.11.45, 3.4.13.47, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38 4.4.0.40, 4.4.0.42 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66 4.7.0.68, 4.7.0.72 4.8.0.74, 4.8.0.76 4.8.1.78)
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#34
No description provided.