Nodes/ComfyUI_Janus_Wrapper/Janus Text To Image (Generation)
ComfyUI Node

Janus Text To Image (Generation)

384x384, Slow, and Oddly Great at Following Your Prompt

By chflame163·Created 2 years ago·Updated about a year ago· 17
Janus Text To Image (Generation)
  • janus_model
  • image
â—„promptA massive blue whale soaring like a bird above a deep blue ocean, slicing through silky waves. The sky is illed with golden and purple auroras, and thewhale's body glimmers with iridescent ights. its tail fin skims the ocean surace,leaving a tral of glowing streams, The scene exudes a futuristic and surrealvibe, with floating islands and glowing crystals in the background. The overall composition is breathtaking and fantastical.â–º
â—„size384â–º
â—„temperature0.5â–º
â—„cfg5.0â–º
â—„token_num576â–º
â—„batch_size1â–º
â—„seed0â–º

Here's the deal in one line: this node generates images with DeepSeek's Janus-Pro, and it does it the old-fashioned way - one image token at a time. It is not a diffusion sampler, so forget everything you know about steps, schedulers, and denoise. You're in a different neighborhood now.

Wire it after Load Janus Model, type a prompt, and get a 384x384 image back. In a world of SDXL and Flux, you reach for this when you want something with a different character: Janus is a stylized, illustration-flavored generator whose real superpower is literal prompt adherence - community side-by-sides showed Janus-Pro-1B following the prompt more faithfully than Flux and SDXL. The catch is you're trading that fidelity for resolution and speed. Nobody's using this for photorealism; it's the model you use for concept sketches, prompt-following tests, or a look your diffusion checkpoints just don't produce.

How it works

Janus generates autoregressively. Your prompt is tokenized, then the model predicts 576 image tokens one at a time. At each step it runs the language model twice - once conditioned, once unconditioned - so it can apply CFG at the logit level (uncond + cfg * (cond - uncond)), samples from a temperature-softened distribution, and feeds the token back in for the next step. When the loop finishes, a VQGAN-style codebook decoder turns the token grid into an image.

The practical upshot: one image is 576 sequential forward passes through the language model. That's why it's slow, and why it's a loop-of-576, full stop. batch_size doesn't make it faster - it just generates that many images in parallel.

The inputs that actually matter

  • janus_model - from the loader node.
  • prompt - multiline, and it likes detail. The default whale prompt is a decent template for how descriptive it wants you to be.
  • cfg - default 5. Real CFG weight on the logits. Crank it too high and you get artifacts, same as diffusion.
  • temperature - default 0.5. Sampling randomness; lower is more conservative.
  • batch_size - default 1. How many images to generate in parallel.
  • seed - for reproducibility.

Two knobs are traps: size and token_num exist in the UI but are locked (384–384 and 576–576). Janus-Pro's output resolution is hardcoded at 384x384 in practice, so don't waste a drag on the slider. Everyone who's tried to fudge it has given up.

Output

One image (an IMAGE tensor of 384x384 frames, one per batch_size). Wire it straight into Save Image. Since 384 is genuinely small, plan an upscale pass after - ComfyUI's standard upscaler nodes do the job fine, and the pack's output won't survive without it if you need anything bigger than a thumbnail.

Installing and troubleshooting

Same install as the whole pack - ComfyUI Manager, search ComfyUI_Janus_Wrapper, or:

cd ComfyUI/custom_nodes
git clone https://github.com/chflame163/ComfyUI_Janus_Wrapper.git
cd ComfyUI_Janus_Wrapper && pip install -r requirements.txt

Common complaints:

  • It's slow. Yes. That's the architecture, not a bug. Use the 1B model if the 7B is unbearable.
  • OOM - switch to Janus-Pro-1B or drop batch_size to 1. No CPU fallback exists.
  • "I set size to 512 and nothing happened" - the slider is locked; see above.
  • "The image looks average" - it's a 1B/7B autoregressive model at 384px. Use it for what it's good at, not as a Flux replacement.
Category😺dzNodes/Janus

Inputs (8)

NameTypeDefaultDescription
janus_modelJanusModel—
promptSTRINGA massive blue whale soaring like a bird above a deep blue ocean, slicing through silky waves. The sky is illed with golden and purple auroras, and thewhale's body glimmers with iridescent ights. its tail fin skims the ocean surace,leaving a tral of glowing streams, The scene exudes a futuristic and surrealvibe, with floating islands and glowing crystals in the background. The overall composition is breathtaking and fantastical.—
sizeINT384384–384—
temperatureFLOAT0.50.1–2—
cfgFLOAT5.00–32—
token_numINT576576–576—
batch_sizeINT11–1024—
seedINT00–1000000000000000000—

Outputs (1)

NameTypeDescription
imageIMAGE—