Janus Text To Image (Generation)
384x384, Slow, and Oddly Great at Following Your Prompt
- janus_model
- image
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_sizeto 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.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| janus_model | JanusModel | — | |
| prompt | STRING | A 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. | — |
| size | INT | 384384–384 | — |
| temperature | FLOAT | 0.50.1–2 | — |
| cfg | FLOAT | 5.00–32 | — |
| token_num | INT | 576576–576 | — |
| batch_size | INT | 11–1024 | — |
| seed | INT | 00–1000000000000000000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |