WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.22k stars 177 forks source link

On Comfy launch, cannot find numba #108

Closed adamski90 closed 1 year ago

adamski90 commented 1 year ago
Traceback (most recent call last):
  File "C:\Users\adam1\Downloads\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1456, 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 "C:\Users\adam1\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\__init__.py", line 1, in <module>
    from .WAS_Node_Suite import NODE_CLASS_MAPPINGS
  File "C:\Users\adam1\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 37, in <module>
    from numba import jit
ModuleNotFoundError: No module named 'numba'`

Cannot import C:\Users\adam1\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui module for custom nodes: No module named 'numba'

Import times for custom nodes:
   0.0 seconds (IMPORT FAILED): C:\Users\adam1\Downloads\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui

Starting server

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

Using Python 3.10

I can confirm that it was apparently installed during the pip install -r requirements.txt When running this again it shows:

Requirement already satisfied: numba in c:\users\adam1\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 8)) (0.57.1)
adamski90 commented 1 year ago

Never mind, I had installed with system Python!

Everything is resolved after:

C:\Users\adam1\Downloads\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install -r requirements.txt
CoraAI commented 1 year ago

Never mind, I had installed with system Python!

Everything is resolved after:

C:\Users\adam1\Downloads\ComfyUI_windows_portable\python_embeded\python.exe -s -m pip install -r requirements.txt

a little futher help here please, I got the same issue and system couldn't find file requirements.txt after I tried

adamski90 commented 1 year ago

a little futher help here please, I got the same issue and system couldn't find file requirements.txt after I tried

The requirements.txt clones from the git if you ran the recommended install option of git clone:

Navigate to your /ComfyUI/custom_nodes/ folder
Run git clone https://github.com/WASasquatch/was-node-suite-comfyui/
Navigate to your was-node-suite-comfyui folder
Portable/venv:
Run path/to/ComfUI/python_embeded/python.exe -s -m pip install -r requirements.txt

My mistake was running system python, but resolved when doing the above (bottom line specifically, will use the python included in ComfyUI. I did this from a powershell terminal opened in the WAS Node directory, so it found the requirements.txt because it was cloned (as it is in the main WAS Node directory). And ComfyUI's embedded Python should now have all of the requirements included if this is done.

CoraAI commented 1 year ago

a little futher help here please, I got the same issue and system couldn't find file requirements.txt after I tried

The requirements.txt clones from the git if you ran the recommended install option of git clone:

Navigate to your /ComfyUI/custom_nodes/ folder
Run git clone https://github.com/WASasquatch/was-node-suite-comfyui/
Navigate to your was-node-suite-comfyui folder
Portable/venv:
Run path/to/ComfUI/python_embeded/python.exe -s -m pip install -r requirements.txt

My mistake was running system python, but resolved when doing the above (bottom line specifically, will use the python included in ComfyUI. I did this from a powershell terminal opened in the WAS Node directory, so it found the requirements.txt because it was cloned (as it is in the main WAS Node directory). And ComfyUI's embedded Python should now have all of the requirements included if this is done.

Thanks! This worked for sure, but another error pop up says a dependency pack's version has conflict:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. blip-ci 0.0.3 requires timm==0.4.12, but you have timm 0.6.7 which is incompatible.

don't know if I can just leave it be....maybe?

WASasquatch commented 1 year ago

Timm is only used for MiDaS and BLIP, you can test the nodes to see if they still work. Let me know if you test 😅

CoraAI commented 1 year ago

Timm is only used for MiDaS and BLIP, you can test the nodes to see if they still work. Let me know if you test 😅

I've just tried, the nodes still failed to install properly. I've double checked my steps, might be my mistake of ignoring several warning messages in the powershell:

PS D:\Ai_program\comfyUI\ComfyUI\custom_nodes\was-node-suite-comfyui> D:\Ai_program\comfyUI\python_embeded\python.exe -s -m pip install -r requirements.txt Collecting git+https://github.com/WASasquatch/img2texture.git (from -r requirements.txt (line 3)) Cloning https://github.com/WASasquatch/img2texture.git to c:\users\administrator\appdata\local\temp\pip-req-build-ax8x296m Running command git clone --filter=blob:none --quiet https://github.com/WASasquatch/img2texture.git 'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-ax8x296m' Resolved https://github.com/WASasquatch/img2texture.git to commit a546609a915caf1dcb84a15bf44b5b639ad924e6 Preparing metadata (setup.py) ... done Collecting git+https://github.com/WASasquatch/ffmpy.git (from -r requirements.txt (line 12)) Cloning https://github.com/WASasquatch/ffmpy.git to c:\users\administrator\appdata\local\temp\pip-req-build-kvru0loy Running command git clone --filter=blob:none --quiet https://github.com/WASasquatch/ffmpy.git 'C:\Users\Administrator\AppData\Local\Temp\pip-req-build-kvru0loy' Resolved https://github.com/WASasquatch/ffmpy.git to commit f000737698b387ffaeab7cd871b0e9185811230d Preparing metadata (setup.py) ... done Collecting cmake (from -r requirements.txt (line 1)) Using cached cmake-3.26.4-py2.py3-none-win_amd64.whl (33.0 MB) Requirement already satisfied: fairscale>=0.4.4 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from -r requirements.txt (line 2)) (0.4.13) Requirement already satisfied: gitpython in d:\ai_program\comfyui\python_embeded\lib\site-packages (from -r requirements.txt (line 4)) (3.1.31) Requirement already satisfied: imageio in d:\ai_program\comfyui\python_embeded\lib\site-packages (from -r requirements.txt (line 5)) (2.31.1) Collecting joblib (from -r requirements.txt (line 6)) Using cached joblib-1.3.1-py3-none-any.whl (301 kB) Requirement already satisfied: matplotlib in d:\ai_program\comfyui\python_embeded\lib\site-packages (from -r requirements.txt (line 7)) (3.7.1) Collecting numba (from -r requirements.txt (line 8)) Using cached numba-0.57.1-cp310-cp310-win_amd64.whl (2.5 MB) Collecting numpy<1.24>=1.18 (from -r requirements.txt (line 9)) Using cached numpy-1.23.5-cp310-cp310-win_amd64.whl (14.6 MB) Collecting opencv-python-headless[ffmpeg] (from -r requirements.txt (line 10)) Using cached opencv_python_headless-4.8.0.74-cp37-abi3-win_amd64.whl (38.0 MB) Collecting pilgram (from -r requirements.txt (line 11)) Using cached pilgram-1.2.1-py3-none-any.whl (817 kB) Collecting rembg (from -r requirements.txt (line 13)) Using cached rembg-2.0.49-py3-none-any.whl (26 kB) Collecting scikit-image==0.20.0 (from -r requirements.txt (line 14)) Using cached scikit_image-0.20.0-cp310-cp310-win_amd64.whl (23.7 MB) Collecting scikit-learn (from -r requirements.txt (line 15)) Using cached scikit_learn-1.3.0-cp310-cp310-win_amd64.whl (9.2 MB) Requirement already satisfied: scipy in d:\ai_program\comfyui\python_embeded\lib\site-packages (from -r requirements.txt (line 16)) (1.10.1) Requirement already satisfied: timm>=0.4.12 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from -r requirements.txt (line 17)) (0.6.7) Requirement already satisfied: tqdm in d:\ai_program\comfyui\python_embeded\lib\site-packages (from -r requirements.txt (line 18)) (4.65.0) Collecting transformers==4.26.1 (from -r requirements.txt (line 19)) Using cached transformers-4.26.1-py3-none-any.whl (6.3 MB) Requirement already satisfied: networkx>=2.8 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from scikit-image==0.20.0->-r requirements.txt (line 14)) (3.1) Requirement already satisfied: pillow>=9.0.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from scikit-image==0.20.0->-r requirements.txt (line 14)) (9.5.0) Requirement already satisfied: tifffile>=2019.7.26 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from scikit-image==0.20.0->-r requirements.txt (line 14)) (2023.4.12) Requirement already satisfied: PyWavelets>=1.1.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from scikit-image==0.20.0->-r requirements.txt (line 14)) (1.4.1) Requirement already satisfied: packaging>=20.0 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from scikit-image==0.20.0->-r requirements.txt (line 14)) (23.1) Requirement already satisfied: lazy_loader>=0.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from scikit-image==0.20.0->-r requirements.txt (line 14)) (0.2) Requirement already satisfied: filelock in d:\ai_program\comfyui\python_embeded\lib\site-packages (from transformers==4.26.1->-r requirements.txt (line 19)) (3.12.2) Requirement already satisfied: huggingface-hub<1.0,>=0.11.0 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from transformers==4.26.1->-r requirements.txt (line 19)) (0.15.1) Requirement already satisfied: pyyaml>=5.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from transformers==4.26.1->-r requirements.txt (line 19)) (6.0) Requirement already satisfied: regex!=2019.12.17 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from transformers==4.26.1->-r requirements.txt (line 19)) (2023.6.3) Requirement already satisfied: requests in d:\ai_program\comfyui\python_embeded\lib\site-packages (from transformers==4.26.1->-r requirements.txt (line 19)) (2.31.0) Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from transformers==4.26.1->-r requirements.txt (line 19)) (0.13.3) Requirement already satisfied: torch>=1.8.0 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from fairscale>=0.4.4->-r requirements.txt (line 2)) (2.0.1+cu118) Requirement already satisfied: gitdb<5,>=4.0.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from gitpython->-r requirements.txt (line 4)) (4.0.10) Requirement already satisfied: contourpy>=1.0.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from matplotlib->-r requirements.txt (line 7)) (1.1.0) Requirement already satisfied: cycler>=0.10 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from matplotlib->-r requirements.txt (line 7)) (0.11.0) Requirement already satisfied: fonttools>=4.22.0 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from matplotlib->-r requirements.txt (line 7)) (4.40.0) Requirement already satisfied: kiwisolver>=1.0.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from matplotlib->-r requirements.txt (line 7)) (1.4.4) Requirement already satisfied: pyparsing>=2.3.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from matplotlib->-r requirements.txt (line 7)) (3.1.0) Requirement already satisfied: python-dateutil>=2.7 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from matplotlib->-r requirements.txt (line 7)) (2.8.2) Collecting llvmlite<0.41,>=0.40.0dev0 (from numba->-r requirements.txt (line 8)) Using cached llvmlite-0.40.1-cp310-cp310-win_amd64.whl (27.7 MB) WARNING: opencv-python-headless 4.8.0.74 does not provide the extra 'ffmpeg' Collecting onnxruntime (from rembg->-r requirements.txt (line 13)) Using cached onnxruntime-1.15.1-cp310-cp310-win_amd64.whl (6.7 MB) Collecting pooch (from rembg->-r requirements.txt (line 13)) Using cached pooch-1.7.0-py3-none-any.whl (60 kB) Collecting pymatting (from rembg->-r requirements.txt (line 13)) Using cached PyMatting-1.1.8-py3-none-any.whl (47 kB) Collecting threadpoolctl>=2.0.0 (from scikit-learn->-r requirements.txt (line 15)) Using cached threadpoolctl-3.1.0-py3-none-any.whl (14 kB) Requirement already satisfied: torchvision in d:\ai_program\comfyui\python_embeded\lib\site-packages (from timm>=0.4.12->-r requirements.txt (line 17)) (0.15.2+cu118) Requirement already satisfied: colorama in d:\ai_program\comfyui\python_embeded\lib\site-packages (from tqdm->-r requirements.txt (line 18)) (0.4.6) Requirement already satisfied: smmap<6,>=3.0.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from gitdb<5,>=4.0.1->gitpython->-r requirements.txt (line 4)) (5.0.0) Requirement already satisfied: fsspec in d:\ai_program\comfyui\python_embeded\lib\site-packages (from huggingface-hub<1.0,>=0.11.0->transformers==4.26.1->-r requirements.txt (line 19)) (2023.6.0) Requirement already satisfied: typing-extensions>=3.7.4.3 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from huggingface-hub<1.0,>=0.11.0->transformers==4.26.1->-r requirements.txt (line 19)) (4.6.3) Requirement already satisfied: six>=1.5 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from python-dateutil>=2.7->matplotlib->-r requirements.txt (line 7)) (1.16.0) Requirement already satisfied: sympy in d:\ai_program\comfyui\python_embeded\lib\site-packages (from torch>=1.8.0->fairscale>=0.4.4->-r requirements.txt (line 2)) (1.12) Requirement already satisfied: jinja2 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from torch>=1.8.0->fairscale>=0.4.4->-r requirements.txt (line 2)) (3.1.2) Collecting coloredlogs (from onnxruntime->rembg->-r requirements.txt (line 13)) Using cached coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB) Requirement already satisfied: flatbuffers in d:\ai_program\comfyui\python_embeded\lib\site-packages (from onnxruntime->rembg->-r requirements.txt (line 13)) (23.5.26) Requirement already satisfied: protobuf in d:\ai_program\comfyui\python_embeded\lib\site-packages (from onnxruntime->rembg->-r requirements.txt (line 13)) (3.20.3) Requirement already satisfied: platformdirs>=2.5.0 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from pooch->rembg->-r requirements.txt (line 13)) (3.8.0) Requirement already satisfied: charset-normalizer<4,>=2 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from requests->transformers==4.26.1->-r requirements.txt (line 19)) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from requests->transformers==4.26.1->-r requirements.txt (line 19)) (3.4) Requirement already satisfied: urllib3<3,>=1.21.1 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from requests->transformers==4.26.1->-r requirements.txt (line 19)) (2.0.3) Requirement already satisfied: certifi>=2017.4.17 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from requests->transformers==4.26.1->-r requirements.txt (line 19)) (2023.5.7) Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime->rembg->-r requirements.txt (line 13)) Using cached humanfriendly-10.0-py2.py3-none-any.whl (86 kB) Requirement already satisfied: MarkupSafe>=2.0 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from jinja2->torch>=1.8.0->fairscale>=0.4.4->-r requirements.txt (line 2)) (2.1.3) Requirement already satisfied: mpmath>=0.19 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from sympy->torch>=1.8.0->fairscale>=0.4.4->-r requirements.txt (line 2)) (1.3.0) Requirement already satisfied: pyreadline3 in d:\ai_program\comfyui\python_embeded\lib\site-packages (from humanfriendly>=9.1->coloredlogs->onnxruntime->rembg->-r requirements.txt (line 13)) (3.4.1) Building wheels for collected packages: img2texture, ffmpy Building wheel for img2texture (setup.py) ... done Created wheel for img2texture: filename=img2texture-1.0.6-py3-none-any.whl size=8446 sha256=079de3a84b4c86bef1d09cfe74835e309166940174cafdf5fffe57766531ded4 Stored in directory: C:\Users\Administrator\AppData\Local\Temp\pip-ephem-wheel-cache-ct7yzj4k\wheels\ef\01\9f\2a02c1af22973c81e59b3e7c5a63a57bc73050b9176aa479d2 Building wheel for ffmpy (setup.py) ... done Created wheel for ffmpy: filename=ffmpy-0.3.0-py3-none-any.whl size=5542 sha256=687f461c833e71f9dfb1f2a343d00d52780a2ace1dc61894c985f35df28cc5a4 Stored in directory: C:\Users\Administrator\AppData\Local\Temp\pip-ephem-wheel-cache-ct7yzj4k\wheels\58\b8\b4\c142357beed3083ac6f76bff1206bb5923ac472c4a740e6921 Successfully built img2texture ffmpy Installing collected packages: ffmpy, cmake, threadpoolctl, numpy, llvmlite, joblib, img2texture, humanfriendly, pooch, pilgram, opencv-python-headless, numba, coloredlogs, transformers, scikit-learn, scikit-image, pymatting, onnxruntime, rembg WARNING: The scripts cmake.exe, cpack.exe and ctest.exe are installed in 'D:\Ai_program\comfyUI\python_embeded\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Attempting uninstall: numpy Found existing installation: numpy 1.24.3 Uninstalling numpy-1.24.3: Successfully uninstalled numpy-1.24.3 WARNING: The script f2py.exe is installed in 'D:\Ai_program\comfyUI\python_embeded\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script img2texture.exe is installed in 'D:\Ai_program\comfyUI\python_embeded\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script humanfriendly.exe is installed in 'D:\Ai_program\comfyUI\python_embeded\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script coloredlogs.exe is installed in 'D:\Ai_program\comfyUI\python_embeded\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Attempting uninstall: transformers Found existing installation: transformers 4.30.2 Uninstalling transformers-4.30.2: Successfully uninstalled transformers-4.30.2 WARNING: The script transformers-cli.exe is installed in 'D:\Ai_program\comfyUI\python_embeded\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Attempting uninstall: scikit-image Found existing installation: scikit-image 0.21.0 Uninstalling scikit-image-0.21.0: Successfully uninstalled scikit-image-0.21.0 WARNING: The script onnxruntime_test.exe is installed in 'D:\Ai_program\comfyUI\python_embeded\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script rembg.exe is installed in 'D:\Ai_program\comfyUI\python_embeded\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed cmake-3.26.4 coloredlogs-15.0.1 ffmpy-0.3.0 humanfriendly-10.0 img2texture-1.0.6 joblib-1.3.1 llvmlite-0.40.1 numba-0.57.1 numpy-1.23.5 onnxruntime-1.15.1 opencv-python-headless-4.8.0.74 pilgram-1.2.1 pooch-1.7.0 pymatting-1.1.8 rembg-2.0.49 scikit-image-0.20.0 scikit-learn-1.3.0 threadpoolctl-3.1.0 transformers-4.26.1 PS D:\Ai_program\comfyUI\ComfyUI\custom_nodes\was-node-suite-comfyui>

CoraAI commented 1 year ago

@WASasquatch short update, issue fixed XD, I tried to run comfyUI by activating another stable diffusion's venv, and WAS-node was finally loaded properly.