ComfyUI > Nodes > ComfyUI-Janus-Pro > Janus Image Generation

ComfyUI Node: Janus Image Generation

Class Name

JanusImageGeneration

Category
Janus-Pro
Author
CY-CHENYUE (Account age: 520days)
Extension
ComfyUI-Janus-Pro
Latest Updated
2025-01-30
Github Stars
0.6K

How to Install ComfyUI-Janus-Pro

Install this extension via the ComfyUI Manager by searching for ComfyUI-Janus-Pro
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Janus-Pro in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Janus Image Generation Description

Generate images from text prompts using advanced machine learning models for AI artists in Janus-Pro suite.

Janus Image Generation:

The JanusImageGeneration node is a powerful tool designed to facilitate the creation of images based on textual prompts. It leverages advanced machine learning models to interpret and transform descriptive text into visual representations, making it an invaluable asset for AI artists looking to generate unique and creative images. This node is part of the Janus-Pro suite, which focuses on multi-modality capabilities, allowing for seamless integration of text and image processing. The primary goal of this node is to provide a user-friendly interface for generating high-quality images by utilizing a combination of language models and image processing techniques. By setting specific parameters, you can control various aspects of the image generation process, such as the randomness of the output, the level of detail, and the overall style, ensuring that the generated images align with your artistic vision.

Janus Image Generation Input Parameters:

model

This parameter specifies the model to be used for image generation. It must be a JANUS_MODEL, which is a pre-trained model capable of understanding and processing multi-modal inputs. The model is responsible for interpreting the prompt and generating the corresponding image tokens.

processor

The processor is a JANUS_PROCESSOR that handles the conversion of text prompts into a format that the model can understand. It applies necessary templates and tokenization to ensure the input is correctly formatted for the model's requirements.

prompt

The prompt is a STRING input that serves as the textual description of the image you wish to generate. It supports multiline input and defaults to "A beautiful photo of". This parameter is crucial as it directly influences the content and style of the generated image.

seed

The seed is an INT that sets the random seed for the image generation process, ensuring reproducibility. It has a default value of 666666666666666 and can range from 0 to 0xffffffffffffffff. By setting a specific seed, you can generate the same image consistently across different runs.

batch_size

This INT parameter determines the number of images to generate in a single batch. It defaults to 1 and can range from 1 to 16. A larger batch size allows for the simultaneous generation of multiple images, which can be useful for exploring variations of a prompt.

cfg_weight

The cfg_weight is a FLOAT that controls the strength of the classifier-free guidance during image generation. It has a default value of 5.0 and can range from 1.0 to 10.0, with a step of 0.5. This parameter affects the balance between creativity and adherence to the prompt, with higher values leading to more faithful representations.

temperature

The temperature is a FLOAT that influences the randomness of the image generation process. It defaults to 1.0 and can range from 0.1 to 2.0, with a step of 0.1. Lower values result in more deterministic outputs, while higher values introduce more variability and creativity.

top_p

The top_p is a FLOAT that determines the cumulative probability threshold for token sampling. It defaults to 0.95 and can range from 0.0 to 1.0. This parameter helps in controlling the diversity of the generated images by limiting the token selection to the most probable options.

Janus Image Generation Output Parameters:

images

The images output is a tensor representing the generated images. It is formatted as a batch of images with dimensions [B, H, W, C], where B is the batch size, H is the height, W is the width, and C is the number of color channels. This output provides the final visual representation of the input prompt, ready for further use or display.

Janus Image Generation Usage Tips:

  • Experiment with different prompt descriptions to explore a wide range of creative outputs. The choice of words can significantly impact the style and content of the generated images.
  • Adjust the temperature and cfg_weight parameters to find the right balance between creativity and adherence to the prompt. Lower temperatures and higher cfg weights can produce more realistic images, while higher temperatures and lower cfg weights can lead to more abstract results.
  • Use the seed parameter to reproduce specific images or explore variations by changing the seed value. This can be particularly useful for iterative design processes.

Janus Image Generation Common Errors and Solutions:

ImportError: Please install Janus using 'pip install -r requirements.txt'

  • Explanation: This error occurs when the Janus library is not installed in your environment.
  • Solution: Ensure that you have installed all necessary dependencies by running the command pip install -r requirements.txt in your terminal.

AssertionError: Unexpected shape: <shape>

  • Explanation: This error indicates that the generated image tensor does not have the expected dimensions.
  • Solution: Verify that the input parameters, especially batch_size, are set correctly. Ensure that the model and processor are compatible and properly configured.

ValueError: Invalid seed value

  • Explanation: This error arises when the seed value is outside the acceptable range.
  • Solution: Check that the seed value is within the specified range of 0 to 0xffffffffffffffff and adjust it accordingly.

Janus Image Generation Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Janus-Pro
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.