ComfyUI 的 Janus-Pro 节点,一个统一的多模态理解和生成框架。
试用:
https://huggingface.co/spaces/deepseek-ai/Janus-1.3B
https://huggingface.co/spaces/deepseek-ai/Janus-Pro-7B
https://huggingface.co/spaces/deepseek-ai/JanusFlow-1.3B
安装方法
方法一:通过 ComfyUI Manager 安装(推荐)
- 安装 ComfyUI-Manager
- 在管理器中搜索 “Janus-Pro”
- 点击安装
方法二:手动安装
- 将此仓库克隆到你的 ComfyUI 的 custom_nodes 文件夹中:
cd ComfyUI/custom_nodes
git clone https://github.com/CY-CHENYUE/ComfyUI-Janus-Pro
- 安装所需依赖:
Windows系统:
# 如果你使用ComfyUI便携版
cd ComfyUI-Janus-Pro
..\..\..\python_embeded\python.exe -m pip install -r requirements.txt# 如果你使用自己的Python环境
cd ComfyUI-Janus-Pro
path\to\your\python.exe -m pip install -r requirements.txt
Linux/Mac系统:
# 使用ComfyUI的Python环境
cd ComfyUI-Janus-Pro
../../python_embeded/bin/python -m pip install -r requirements.txt# 或者使用你的环境
cd ComfyUI-Janus-Pro
python -m pip install -r requirements.txt
注意:如果你遇到安装问题:
- 确保已安装 git
- 尝试更新 pip:python -m pip install --upgrade pip
- 如果你使用代理,确保 git 可以访问 GitHub
- 确保使用的是与 ComfyUI 相同的 Python 环境
模型下载
将模型文件放在 ComfyUI/models/Janus-Pro
文件夹中:
- 在你的 ComfyUI 的 models 目录下创建
Janus-Pro
文件夹 - 从 Hugging Face 下载模型:
- Janus-Pro-1B
- Janus-Pro-7B
- 将模型解压到各自的文件夹中:
ComfyUI/models/Janus-Pro/Janus-Pro-1B/
ComfyUI/models/Janus-Pro/Janus-Pro-7B/
问题:
1. 提示JanusModelLoader
错误
Please install Janus using 'pip install -r requirements.txt'
根据自己的目录位置和命令的实际情况使用下面的解决方法
- 先升级python
案例中是comfyui自带的python
# D:\Ai\ComfyUI-aki> 目录下执行命令升级
D:\Ai\ComfyUI-aki\python\python.exe -m pip install -r requirements.txt
- 再安装所需组件即可
# D:\Ai\ComfyUI-aki\custom_nodes\ComfyUI-Janus-Pro> 目录下执行必要命令
D:\Ai\ComfyUI-aki\ComfyUI-aki-v1.4\python\python.exe -m pip install -r requirements.txt
2. 没有安装git提示必要内容安装失败 系统找不到指定的文件
git clone https://github.com/deepseek-ai/Janus.git
即本句执行失败
错误内容如:
WARNING: Ignoring invalid distribution -nnxruntime (d:\ai\comfyui-aki\python\lib\site-packages)
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting git+https://github.com/deepseek-ai/Janus.git (from -r requirements.txt (line 1))Cloning https://github.com/deepseek-ai/Janus.git to c:\users\xxx\appdata\local\temp\pip-req-build-h7uhnkg3ERROR: Error [WinError 2] 系统找不到指定的文件。 while executing command git version
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?
-
官网下载
https://github.com/deepseek-ai/Janus
-
解压至某目录
比如是目录D:\AI\comfyui-aki\Janus
- 执行命令安装
# D:\Ai\ComfyUI-aki\custom_nodes\ComfyUI-Janus-Pro> 目录下执行如下命令
D:\Ai\ComfyUI-aki\python\python.exe -m pip install "D:\AI\comfyui-aki\Janus"
- 成功
链接
https://github.com/CY-CHENYUE/ComfyUI-Janus-Pro
https://comfyui-wiki.com/zh/tutorial/advanced/deepseek-janus-pro-workflow