严重 Bug 报告:Web 根目录指向错误、DWPose 加载失败及 API 模块导入异常
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
1.前端通信:前端应正确指向 ComfyUI 内置的 app/assets 目录,并能正常与后端 API 通信。
2.依赖加载:Custom Nodes 应能识别系统 Python 环境中已安装的库(如 scikit-image)。
3.模块导入:comfy_api 目录应被正确识别为 Python 模块,无导入错误。
4.环境兼容:PyTorch 应使用 cu130 以支持 Dynamic VRAM。
### Actual Behavior
1.Web 根目录错误:日志显示 Web 根目录错误指向了 Python 的 site-packages 目录,导致前端无法加载资源或通信失败 ("Failed to fetch")。
2.DWPose 节点报错:加载 DWPose 时提示 ModuleNotFoundError: No module named 'skimage'。虽然系统中已安装 scikit-image,但 ComfyUI 的环境路径未包含用户级 site-packages。
3.API 模块导入失败:启动时报错 No module named 'comfy_api'。经检查,comfy_api/__init__.py 文件大小为 0 字节(空文件),导致 Python 无法识别该模块。
4.CUDA 版本警告:提示当前 PyTorch 版本 (cu124) 过旧,无法使用优化的 CUDA 操作和动态显存管理。
### Steps to Reproduce
1.启动 ComfyUI。
2.查看控制台日志,确认 Web Root 路径错误及 comfy_api 导入错误。
3.尝试加载包含 DWPose 节点的工作流。
4.检查 Python 环境中的包列表,确认 scikit-image 已安装。
### Debug Logs
```powershell
[Prompt Server] web root: C:\Users...\site-packages\comfyui_frontend_package\static
# Error: comfy_api/__init__.py is 0 bytes
Error: No module named 'comfy_api'
# When loading DWPose:
ModuleNotFoundError: No module named 'skimage'
# Note: scikit-image is installed at ...Python313\Lib\site-packages (0.26.0)
```
### Other
ComfyUI 版本: 0.20.1
Python 版本: 3.13.7
PyTorch 版本: 2.6.0+cu124
操作系统: Windows 11 Pro Build 26200
硬件: NVIDIA RTX 4060 Laptop (8GB VRAM)
建议修复方案:
1.前端包重装: python -m pip install --force-reinstall comfyui-frontend-package
2.路径修复: 在 main.py 开头添加 import sys; import site; site.addsitedir(site.getusersitepackages())
3.核心修复: 修复 comfy_api/__init__.py 文件内容。
4.PyTorch 升级: pip install --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130
2 / 2
Contributor guide
Research direction
Treat the web-root, DWPose dependency, comfy_api import, and CUDA warning as separate symptoms. Start by reproducing the reported startup logs on the stated Windows and Python setup, then inspect main.py and comfy_api/__init__.py; done means identifying which failures are ComfyUI defects versus environment or package setup issues.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- ai, api, backend, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100