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