Analyze Image with Janus
Ask Janus what's actually in your image
- janus_model
- image
- description
The image-understanding half of DeepSeek's Janus-Pro, wrapped in a single node: feed it any IMAGE from your graph and a question, and it answers in text. This is the node to reach for when you want your workflow to look at things - captioning a dataset for training, checking whether a generation actually matches the prompt, or building a text-based filter that routes images based on what they contain. No API, no key, fully local; it runs on the model you loaded with the pack's JanusProLoader.
How it works
Under the hood it does the standard Janus vision-language dance. Your image and question are wrapped into the model's chat format with an <image_placeholder> token, embedded via prepare_inputs_embeds, and the language model generates a reply with the sampling parameters you set. Because it's a real LLM doing the talking, the answer comes back as natural text - you can ask for a caption, "what color is the car?", or "is there a watermark?" and it follows the question's language.
The inputs that matter
Most of the knobs you can leave alone, honestly. The ones you'll actually touch:
- question - whatever you want to ask. The default is the Chinese "请描述这张图片。" ("please describe this image"); replace it with an English prompt and it answers in English.
- temperature - defaults to 0.1, which is nearly greedy and gives you the stable, descriptive answers you want from a captioner. Crank it up if you want variety, or set it to 0 for pure greedy.
- max_new_tokens - how long the answer can be (up to 2048). Bump it for detailed captions.
seed, top_p, and image (the picture itself, from any Load Image or sampler output) are the rest. The required janus_model input is the bundle from the loader.
The output
A single description output, type STRING. It's just text, so in ComfyUI you display it with a text-output widget or wire it anywhere that takes a string - a filename-builder for saving captions alongside images, a text-prompt feeder, whatever. It is not a fancy structured object; don't overthink it.
Install and gotchas
Install is the pack-level dance: ComfyUI Manager → search ComfyUI_Yc_JanusPro, or git clone into custom_nodes, restart, then download a model into ComfyUI/models/Janus-Pro/ per the loader's instructions. The whole pack needs the model loaded first - if the loader failed, this node doesn't crash, it just hands you the loader's error text as its "answer," which is confusing the first time you see it.
Two things worth knowing going in. First, the 1B model is the sweet spot here: fast, low VRAM, and community comparisons from when Janus launched singled out its prompt adherence even in understanding tasks. Second, because it's a sampling-based LLM, caption output isn't deterministic across runs unless you keep the seed fixed - a detail that matters if you're captioning a training set and want consistency. If you need the same caption twice, lock the seed and temperature down.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| janus_model | JANUS_MODEL | — | |
| image | IMAGE | — | |
| question | STRING | 请描述这张图片。 | — |
| seed | INT | 420–18446744073709550000 | — |
| temperature | FLOAT | 0.10–2 | — |
| top_p | FLOAT | 0.950–1 | — |
| max_new_tokens | INT | 5121–2048 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| description | STRING | — |