π± Artha Gemini Subject
The node that writes your subject prompt for you (or reads it off a reference image)
- image
- subject
Artha Gemini Subject is the π± Artha pack's subject-description node: it produces a structured subject that pairs with its sibling Style node to describe what is in the frame and how it looks. Two modes, one honest split - in its simplest form it just passes your text through, and in its useful form it reads a reference image and lets Gemini write the subject description.
That pass-through mode is the first thing to know, because it's easy to misread the node as a text generator. With use_image off, whatever you type into text_prompt is what comes out the subject output. The real value is in the other mode: feed it an image, and it becomes a vision call that returns a detailed subject description you can feed into a prompt.
How it works
With use_image on and an image wired in, the node converts the tensor to PIL and sends it to Gemini with a bundled system prompt (subject or subjects, depending on only_main). The returned text is stripped of markdown artifacts (* and #) so you get clean prose, and that becomes the subject (ARTHASUBJECT) output.
The only_main toggle controls scope: true (default) asks for the single main subject in the image; false asks for all subjects. For a character shot you usually want true; for a busy scene with a crowd, flip it and let Gemini enumerate.
Inputs that matter
- text_prompt - used directly when
use_imageis off, ignored (overridden by the vision call) when it's on. - use_image - off = text pass-through; on = Gemini reads the image.
- only_main - single subject vs. all subjects, default
true. - image - optional IMAGE input, only meaningful when
use_imageis on. - api_key, model, max_tokens, temperature - the shared Artha Gemini parameter block; model defaults to
gemini-2.5-flash.
Output is a single subject (ARTHASUBJECT) output, which is designed to feed into other Artha prompt-compose nodes rather than straight into a text prompt. It's a custom type, so if you're not using the rest of the pack's chain, grab the text via the broader Gemini nodes instead.
Installing it
Same one-pack install as every Artha node:
cd ComfyUI/custom_nodes
git clone https://github.com/Cyrostar/ComfyUI-Artha-Nodes
pip install -r ComfyUI/custom_nodes/ComfyUI-Artha-Nodes/requirements.txt
restart ComfyUI, or search "ComfyUI-Artha-Nodes" in ComfyUI Manager. Dependencies are the standard google-genai + torch/numpy/Pillow stack - no local models. You'll need a free Gemini API key from aistudio.google.com, set in the pack's api.json as gemini_api_key, as a GEMINI_API_KEY env var, or in the node field (plain text - the pack flags it).
Common issues
- Text comes back unchanged and you expected analysis:
use_imageis off, or no image is wired to the optional input. Check both. - Empty subject output: API key problem; the node logs the failure to the console.
- Subject ignores your prompt in image mode: that's by design - the vision call replaces the text. If you want to steer it, edit the bundled
nodes/llm/agents/subject.txtagent prompt. - Quota: image mode is a metered cloud call, so a big batch of references costs tokens like any other Gemini usage.
Honest verdict: if you're not using the reference-image mode or the Artha compose chain, this node is mostly a fancy pass-through. But as the "what's in this image" half of a subject+style pair, it's the one I'd reach for when a look needs to be reusable.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| text_prompt | STRING | A cat with a hat | β |
| api_key | STRING | API key will be visible in plain text. Consider adding your api to the api.json located inside this custom node folder. | |
| model | COMBO | gemini-2.5-flash | 5 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash, gemini-2.0-flash-lite |
| max_tokens | INT | 50001β8192 | For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60β80 English words. |
| temperature | FLOAT | 0.70β2 | A temperature of 0 means only the most likely tokens are selected. Higher values increase randomness. |
| use_image | BOOLEAN | false | β |
| only_main | BOOLEAN | true | β |
| imageopt | IMAGE | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| subject | ARTHASUBJECT | β |