ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

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

Open long3012218885 opened this issue 1 year ago • 3 comments

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

long3012218885 avatar Aug 02 '24 07:08 long3012218885

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 avatar Aug 03 '24 10:08 Buumcode

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

Buumcode avatar Aug 03 '24 12:08 Buumcode

@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.

DiegoRRR avatar Aug 09 '24 14:08 DiegoRRR

This issue is being marked stale because it has not had any activity for 30 days. Reply below within 7 days if your issue still isn't solved, and it will be left open. Otherwise, the issue will be closed automatically.

github-actions[bot] avatar Mar 17 '25 11:03 github-actions[bot]