comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
54.87k stars 5.79k forks source link

Error loading caffe2_nvrtc.dll or one of its dependencies. #989

Open tenrandomdigits opened 1 year ago

tenrandomdigits commented 1 year ago

I've just installed, and this is what I get every time I try to run ComfyUI on Windows:

$ python main.py Traceback (most recent call last): File "X:\SD\ComfyUI\main.py", line 66, in import comfy.utils File "X:\SD\ComfyUI\comfy\utils.py", line 1, in import torch File "C:\Users\tenra\AppData\Roaming\Python\Python310\site-packages\torch__init__.py", line 133, in raise err OSError: [WinError 126] The specified module could not be found. Error loading "C:\Users\tenra\AppData\Roaming\Python\Python310\site-packages\torch\lib\caffe2_nvrtc.dll" or one of its dependencies.

caffe2_nvrtc.dll does in fact exist in that directory!

I've tried to reinstall torch with pip and pip3. I've tried to add this directory to my PATH. Also tried the standalone package.

My Automatic1111 installation works fine, and the ComfyUI extension within it works fine too.

Any help would be much appreciated

Acrivec commented 2 months ago

My comfy-zluda has been working correctly before, today I've launched it, updated it, and after first try of generation it crashed and no longer opens.

I have the same issue as you.

[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-08-18 20:33:14.314398
** Platform: Windows
** Python version: 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
** Python executable: P:\StableDiffusion\ComfyUI-Zluda\venv\Scripts\python.exe
** ComfyUI Path: P:\StableDiffusion\ComfyUI-Zluda
** Log path: P:\StableDiffusion\ComfyUI-Zluda\comfyui.log

Prestartup times for custom nodes:
   0.0 seconds: P:\StableDiffusion\ComfyUI-Zluda\custom_nodes\rgthree-comfy
   2.1 seconds: P:\StableDiffusion\ComfyUI-Zluda\custom_nodes\ComfyUI-Manager

Traceback (most recent call last):
  File "P:\StableDiffusion\ComfyUI-Zluda\main.py", line 73, in <module>
    import comfy.utils
  File "P:\StableDiffusion\ComfyUI-Zluda\comfy\utils.py", line 1, in <module>
    import torch
  File "P:\StableDiffusion\ComfyUI-Zluda\venv\lib\site-packages\torch\__init__.py", line 141, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "P:\StableDiffusion\ComfyUI-Zluda\venv\lib\site-packages\torch\lib\caffe2_nvrtc.dll" or one of its dependencies.

I've tried running install.bat but it does not help.