Nodes Browser

ComfyDeploy: How ComfyUI_Janus_Wrapper works in ComfyUI?

What is ComfyUI_Janus_Wrapper?

Unofficial implementation of [a/deepseek-ai/Janus](https://github.com/deepseek-ai/Janus) in ComfyUI.

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for ComfyUI_Janus_Wrapper and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

ComfyUI Janus Wrapper

Unofficial implementation of deepseek-ai/Janus in ComfyUI.

image

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 and copy to ComfyUI\models\Janus-Pro\Janus-Pro-7B folder. Download all files of the Janus-Pro-1B and copy to ComfyUI\models\Janus-Pro\Janus-Pro-1B folder.

Nodes Description

Load Janus Model

Load the Janus model. image

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. image

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. image

节点选项:

  • 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.