Gourieff / comfyui-reactor-node

Fast and Simple Face Swap Extension Node for ComfyUI
GNU General Public License v3.0
1.08k stars 114 forks source link

ModuleNotFoundError: No module named 'distutils' #303

Closed QkiZMR closed 1 month ago

QkiZMR commented 1 month ago

First, confirm

What happened?

Can't load reactor node in ComfyUI. Node was installed by Comfy Manager. After Comfy restart I'm getting following error.

Traceback (most recent call last):
  File "/home/qkiz/AI/ComfyUI/nodes.py", line 1887, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/__init__.py", line 23, in <module>
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/nodes.py", line 52, in <module>
    from r_basicsr.utils.registry import ARCH_REGISTRY
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/r_basicsr/__init__.py", line 3, in <module>
    from .archs import *
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/r_basicsr/archs/__init__.py", line 16, in <module>
    _arch_modules = [importlib.import_module(f'r_basicsr.archs.{file_name}') for file_name in arch_filenames]
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/r_basicsr/archs/basicvsr_arch.py", line 6, in <module>
    from .arch_util import ResidualBlockNoBN, flow_warp, make_layer
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/r_basicsr/archs/arch_util.py", line 6, in <module>
    from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'

Cannot import /home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node module for custom nodes: No module named 'distutils'

Steps to reproduce the problem

Just install node.

Sysinfo

OS: Ubuntu 24.04 Python: 3.12.3 (installed in venv) Browser: Firefox 125.0.3 GPU: NVIDIA GeForce 840M other nodes: Import times for custom nodes:
0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Embedding_Picker
0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_ADV_CLIP_emb
0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_Dave_CustomNode
0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus
0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_TiledKSampler
0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Openpose-Editor-Plus
0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts
0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale 0.2 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Inspire-Pack
0.2 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Manager
1.8 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Impact-Pack
3.1 seconds (IMPORT FAILED): /home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node
3.3 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Crystools

Relevant console log

** ComfyUI startup time: 2024-05-08 19:52:34.686841                                                                                                                                                            
** Platform: Linux                                                                                     
** Python version: 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0]                                                                                                                                           
** Python executable: /home/qkiz/AI/ComfyUI/venv/bin/python                                            
** Log path: /home/qkiz/AI/ComfyUI/comfyui.log  

Prestartup times for custom nodes:                                                                                                                                                                             
   0.1 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Manager                                     

Total VRAM 1996 MB, total RAM 15909 MB                                                                 
Trying to enable lowvram mode because your GPU seems to have 4GB or less. If you don't want this use: --normalvram                                                                                             
Set vram state to: LOW_VRAM                                                                            
Device: cuda:0 NVIDIA GeForce 840M : native                                                            
VAE dtype: torch.float32                                                                               
Using pytorch cross attention                                                                          
### Loading: ComfyUI-Manager (V2.7.2)                                                                  
### ComfyUI Revision: 2008 [f81dbe26] | Released on '2024-02-21'            
Openpose Editor Plus: Loaded                                                                           
[Crystools INFO] Crystools version: 1.11.0                                                             
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json                                                                                       
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json                                                                                       
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json                                                                                 
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json                                                                               
[Crystools INFO] CPU: Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz - Arch: x86_64 - OS: Linux 6.8.0-31-lowlatency                                                                                                 
[Crystools INFO] GPU/s:                            
[Crystools INFO] 0) NVIDIA GeForce 840M    
[Crystools INFO] NVIDIA Driver: 550.78                                                                 
### Loading: ComfyUI-Impact-Pack (V4.80)
### Loading: ComfyUI-Impact-Pack (Subpack: V0.5)
[Impact Pack] Wildcards loading done.
Davemane42 Custom Nodes: Loaded
### Loading: ComfyUI-Inspire-Pack (V0.65.6)                                                            
[ReActor] - STATUS - Running v0.5.0-b2 in ComfyUI
Torch version: 2.3.0+cu121
Traceback (most recent call last):                                                                                                                                                                             
  File "/home/qkiz/AI/ComfyUI/nodes.py", line 1887, in load_custom_node                                                                                                                                        
    module_spec.loader.exec_module(module)                                                                                                                                                                     
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module                                                                                                                                      
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed                                                                                                                                 
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/__init__.py", line 23, in <module>                                                                                                             
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS                                 
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/nodes.py", line 52, in <module>                                                                                                                
    from r_basicsr.utils.registry import ARCH_REGISTRY                                                 
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/r_basicsr/__init__.py", line 3, in <module>                                                                                                    
    from .archs import *                      
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/r_basicsr/archs/__init__.py", line 16, in <module>                                                                                             
    _arch_modules = [importlib.import_module(f'r_basicsr.archs.{file_name}') for file_name in arch_filenames]                                                                                                  
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                           
  File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/r_basicsr/archs/basicvsr_arch.py", line 6, in <module>                                                                                         
    from .arch_util import ResidualBlockNoBN, flow_warp, make_layer                                    
  File "/home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node/r_basicsr/archs/arch_util.py", line 6, in <module>                                                                                             
    from distutils.version import LooseVersion                                                         
ModuleNotFoundError: No module named 'distutils'
Cannot import /home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node module for custom nodes: No module named 'distutils'                                                                                     

Import times for custom nodes:                                                                                                                                                                                 
   0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Embedding_Picker                            
   0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_ADV_CLIP_emb                                                                                                                                        
   0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_Dave_CustomNode
   0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_IPAdapter_plus                                                                                                                                      
   0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_TiledKSampler                                                                                                                                       
   0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Openpose-Editor-Plus                        
   0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Custom-Scripts    
   0.0 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI_UltimateSDUpscale
   0.2 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Inspire-Pack                                                                                                                                        
   0.2 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Manager                                                                                                                                             
   1.8 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Impact-Pack                                 
   3.1 seconds (IMPORT FAILED): /home/qkiz/AI/ComfyUI/custom_nodes/comfyui-reactor-node                                                                                                                        
   3.3 seconds: /home/qkiz/AI/ComfyUI/custom_nodes/ComfyUI-Crystools                                   

Starting server

To see the GUI go to: http://127.0.0.1:8188

Additional information

No response

QkiZMR commented 1 month ago

After

pip install setuptools

in venv problem gone. But this should be added to requirements.txt