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

Janus Image To Text (Understanding)

A Local Image Captioner With No API Key

By chflame163·Created 2 years ago·Updated about a year ago· 17
Janus Image To Text (Understanding)
  • janus_model
  • image
  • text
â—„questiondescribe this imageâ–º
â—„temperature0.5â–º
â—„max_new_tokens512â–º
â—„seed0â–º

Point it at an image, ask a question, get a sentence back. This is the understanding half of DeepSeek's Janus-Pro, and unlike half the "describe this image" nodes floating around ComfyUI, it doesn't call any API and needs no key. It's a real local vision-language model sitting in your graph, and that's quietly a big deal.

You reach for it in the usual captioning spots: describing reference shots, batch-captioning images you're about to train LoRAs on, or just interrogating an image with a specific question ("what color is the car?", "is there readable text in this?"). Because it takes any IMAGE input, you can also feed it a frame from a video workflow and ask what's happening. It's the kind of node that lives at the edge of a graph and feeds text into a text-display node, a prompt builder, or a file saver.

How it works

Janus embeds your image with a SigLIP vision tower, projects the embeddings into the language model's space with an aligner, then generates text tokens autoregressively - one token at a time, just like a chat model. The node loops over every image in the input batch, so a batch of five images gives you five answers, each keyed to its own image.

The inputs that matter

  • janus_model - from Load Janus Model.
  • image - any IMAGE you can produce; it handles a full batch.
  • question - the prompt, defaulting to describe this image. Multiline, so you can ask multi-part questions.
  • max_new_tokens - default 512. The cap on how long the answer can be. The classic gotcha: if you're getting cut-off answers, this is the knob, not temperature.

Two inputs are largely cosmetic in the current code: temperature and seed. The underlying generation call uses greedy decoding (do_sample=False), so cranking temperature up won't make answers more creative, and the seed isn't doing much either. Leave them alone and spend your energy on the question instead.

Output

One text output - and here's the beginner trap: it's a list, not a single string. ComfyUI's basic Show Text node may grumble, so wire it into a text node that handles lists, or read it as one answer per input image. If you fed in a batch of four, you'll see four strings.

Installing and troubleshooting

Same pack, same install - ComfyUI Manager, search ComfyUI_Janus_Wrapper, restart, or:

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

The first run downloads the model into ComfyUI/models/Janus-Pro/ automatically (a few GB for the 1B, ~15GB for the 7B). If it fails, grab the files from HuggingFace and drop them there manually.

Things people actually hit:

  • "My text node shows nothing / an error" - the output is a list; use a list-aware text display.
  • "Changing temperature does nothing" - expected, see above. Greedy decode.
  • "It's slow on my 8GB card" - switch the loader to Janus-Pro-1B. The 7B needs roughly 16GB+ and there's no CPU fallback.
  • "The answer is cut off" - raise max_new_tokens.

For local, offline image understanding, it's the rare node that Just Works - once you remember it's a list.

Category😺dzNodes/Janus

Inputs (6)

NameTypeDefaultDescription
janus_modelJanusModel—
imageIMAGE—
questionSTRINGdescribe this image—
temperatureFLOAT0.50.1–2—
max_new_tokensINT5128–4096—
seedINT00–1000000000000000000—

Outputs (1)

NameTypeDescription
textSTRING—