ComfyUI_Janus_Wrapper

ComfyUI_Janus_Wrapper
★ 17

ComfyUI插件Janus封装模型集成图像生成
将 deepseek-ai/Janus 非官方实现封装为 ComfyUI 节点,简化在 ComfyUI 中集成与调用 Janus 模型的流程与安装。
💡 在 ComfyUI 流程中调用 Janus 模型进行图像生成或处理。
🍴 1 Forks💻 Python🔄 2025-03-12
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/51137d50651f
📦 requirements.txt
numpy<2.0
pillow
transformers
timm
accelerate
sentencepiece
attrdict
einops
huggingface_hub
tqdm
image
image
image
image
📄 README

ComfyUI Janus Wrapper

Unofficial implementation of deepseek-ai/Janus in ComfyUI.

Install

  • Open a cmd window in the CompyUI plugin directory (e.g. “CompyUI\custom_nodes\”) and type
  • git clone https://github.com/chflame163/ComfyUI_Janus_Wrapper.git

  • Install dependency packages
  • Open a cmd window in the plugin directory of “ComfyUI\custom_nodes\ComfyUI_Janus_Wrapper“ in the resource manager,

      Enter the following command for the ComfyUI Windows Official Portable:

    ..\..\..\python_embeded\python.exe -s -m pip install -r requirements.txt

      Enter the following command for the Aki-ComfyUI:

    ..\..\python\python.exe -s -m pip install -r requirements.txt

    Download Models

    The model will be automatically downloaded during the first run. If the download fails, please manually download the model.

    Download all files of the [Janus-Pro-7B](https://huggingface.co/deepseek-ai/Janus-Pro-7B/tree/main ) and copy to “ComfyUI\models\Janus-Pro\Janus-Pro-7B“ folder.

    Download all files of the [Janus-Pro-1B](https://huggingface.co/deepseek-ai/Janus-Pro-1B/tree/main ) and copy to “ComfyUI\models\Janus-Pro\Janus-Pro-1B“ folder.

    Nodes Description

    Load Janus Model

    Load the Janus model.

    Node Options:

  • model: Select the model. There are currently two models to choose from: Janus-Pro-7B, Janus-Pro-1B
  • Janus Text To Image (Generation)

    Generate image nodes from text.

    Node Options:

  • janus_model: Janus model input.
  • prompt: The prompt text.
  • size: The image size, currently only supports 384*384.
  • temperature: The temperature parameter of the model.
  • cfg: The cfg parameter of the model.。
  • token_num: The image_token_num_per_image parameter of the model.
  • batch_size: The parallel_size parameter of the model.
  • seed: The seed value.
  • control_after_gentrate: Change the seed options after generating the image.
  • Janus Image To Text (Understanding)

    Generate text nodes from images.

    节点选项:

  • janus_model: Janus model input.
  • image: The input images.
  • question: Questions raised regarding visual recognition of models.
  • temperature: The temperature parameter of the model.
  • max_new_tokens: The max_new_tokens of the model.
  • seed: The seed value.
  • control_after_gentrate: Change the seed options after generating the image.
  • statement

    All nodes follows the MIT license, Some of its functional code comes from other open-source projects. Thanks to the original author. If used for commercial purposes, please refer to the original project license to authorization agreement.