ComfyUI Essentials 常见问题解决方案
项目地址:https://gitcode.com/gh_mirrors/co/ComfyUI_essentials
项目基础介绍
ComfyUI Essentials 是一个开源项目,旨在为 ComfyUI 提供一些核心功能中缺失的节点。这些节点大多是新功能,而非简单的复用。项目的目标是暂时填补这些空白,直到这些功能被整合到 ComfyUI 的核心中。项目主要使用 Python 和 JavaScript 进行开发。
新手使用注意事项及解决方案
1. 安装后无法加载 ComfyUI Essentials
问题描述:安装 ComfyUI Essentials 后,重启 ComfyUI 时无法加载该插件。
解决步骤:
- 更新 Conda 依赖:首先,确保你的 Conda 环境是最新的。你可以通过运行以下命令来更新所有依赖:
conda update --all
- 检查安装路径:确保 ComfyUI Essentials 安装在正确的路径下。通常路径为
ComfyUI/custom_nodes/ComfyUI_essentials
。 - 重启 ComfyUI:更新依赖后,重启 ComfyUI 以确保所有更改生效。
2. 导入错误:ImportError: cannot import name 'CompVisVDenoiser' from 'comfy.samplers'
问题描述:在使用 ComfyUI 时,安装 efficiency-nodes-comfyui
插件后出现导入错误。
解决步骤:
- 定位错误文件:找到
ComfyUI\custom_nodes\efficiency-nodes-comfyui\py\smZ_cfg_denoiser.py
文件。 - 修改导入代码:将文件中的导入语句修改为正确的路径。例如,将
from comfy.samplers import CompVisVDenoiser
修改为from comfy.samplers.compvis import CompVisVDenoiser
。 - 重启 ComfyUI:修改完成后,重启 ComfyUI 以应用更改。
3. 缺少模块:No module named 'torchvision.transforms.v2'
问题描述:在运行 ComfyUI Essentials 时,出现缺少 torchvision.transforms.v2
模块的错误。
解决步骤:
- 检查 PyTorch 版本:确保你使用的 PyTorch 和 torchvision 版本是兼容的。建议使用 PyTorch 1.13 和 torchvision 0.14 版本。
- 修改导入代码:在
ComfyUI/custom_nodes/ComfyUI_essentials/essentials.py
文件中,将第16行的导入语句修改为兼容的版本。例如,将from torchvision.transforms.v2 import ...
修改为from torchvision.transforms import ...
。 - 安装缺失模块:如果仍然缺少模块,可以通过 pip 安装缺失的模块:
pip install torchvision==0.14
- 重启 ComfyUI:完成上述步骤后,重启 ComfyUI 以确保所有更改生效。
通过以上步骤,新手用户可以解决在使用 ComfyUI Essentials 过程中遇到的一些常见问题。
ComfyUI_essentials 项目地址: https://gitcode.com/gh_mirrors/co/ComfyUI_essentials