Comfy-Org / Comfy-Org/ComfyUI

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

Open
#4,172 4 comments 0 reactions 0 assignees View on GitHub
Stale User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

### Your question

![image](https://github.com/user-attachments/assets/f7162d20-923b-4f6d-a389-d5d1bc0997b9)

### Logs

```powershell
G:\ComfyUI>python server.py
Traceback (most recent call last):
File "G:\ComfyUI\server.py", line 6, in
import nodes
File "G:\ComfyUI\nodes.py", line 1, in
import torch
File "g:\ComfyUI\.venv\Lib\site-packages\torch\__init__.py", line 148, in
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_

Contributor guide

Open the contributing guide

Research direction

Start with server.py and nodes.py, then reproduce the PowerShell command shown in the traceback. Inspect the torch import failure and its reported torch_python.dll dependency; done means ComfyUI starts past the import without WinError 126.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
backend, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.