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
51.84k stars 5.44k forks source link

Error loading "g:\ComfyUI\.venv\Lib\site-packages\torch\lib\torch_python.dll" or one of its dependencies #4172

Open long3012218885 opened 1 month ago

long3012218885 commented 1 month ago

Your question

image

Logs

G:\ComfyUI>python server.py
Traceback (most recent call last):
  File "G:\ComfyUI\server.py", line 6, in <module>
    import nodes
  File "G:\ComfyUI\nodes.py", line 1, in <module>
    import torch
  File "g:\ComfyUI\.venv\Lib\site-packages\torch\__init__.py", line 148, in <module>
    raise err
OSError: [WinError 126] 找不到指定的模块。 Error loading "g:\ComfyUI\.venv\Lib\site-packages\torch\lib\torch_python.dll" or one of its dependencies.

Other

No response

Buumcode commented 1 month ago

Error [WinError 126] is error about DLL dependencies. You have DLL, but your DLL trying to connect to other DLL's - dependecied DLL's - which you don't have. Example: I have Windows 7 and have this error: OSError: [WinError 126] The specified module could not be found. Error loading "C:\ComfyUI_v0.0.2\python_embeded\Lib\site-packages\torch\lib\c10_cuda.dll" or one of its dependencies. https://www.dependencywalker.com/ show me that for my c10_cuda.dll. As you can see, my c10_cuda.dll can't find dependencies DLL's. So I need to find them and install. Dependency_walker_c10_cuda-dll_snap

Buumcode commented 1 month ago

LOL, I find all this DLL's on https://ru.dll-files.com/ and manually install all of them. And... They immediately asking me for more DLL's – first of in list is unsearcheable on this site. OK, I'm off ) Dependency_walker_c10_cuda-dll_snap_3

DiegoRRR commented 1 month ago

@long3012218885 @Buumcode

Example: I have Windows 7 and

Are you trying to use a recent version of ComfyUI on Windows 7? I am also trying to use ComfyUI on Windows 7. I read that Comfy now needs Cuda 12 while Windows 7 can only use Cuda dlls up to Cuda 11. Because of this the last version we can use is from 28 april 2023, that you can find here under the "assets" rollup : https://github.com/comfyanonymous/ComfyUI/releases . Maybe this can help you.