π± Gemini Subject
Describe a cat with a hat, or hand Gemini a photo to describe for you
- subject
Gemini Subject is the entry point on the composition side of the Artha pack - the node that answers "what's the main subject?" and hands the answer downstream in a structured form. Its default text_prompt is "A cat with a hat", which tells you the whole vibe: it's the pack's least serious-looking node and also one of its most flexible. It's from the π± Artha-Gemini family (Cyrostar, category Artha/LLM/GEMINI), and its subject output (type ARTHASUBJECT) feeds Gemini Compose - the pack's scene/video counterpart to Gemini Portrait - where it joins camera, style, light and scene into a single composition prompt.
Two modes, and the manual one is almost embarrassingly simple. With use_image off, the node does nothing but pass your text_prompt through to the subject output. No API call, no processing - it's a glorified pass-through wire, and it exists so your prose subject can flow into Compose alongside the structured dropdown nodes. That's fine; not every node needs to be clever.
The interesting mode is use_image. Flip it, pick a reference image, and Gemini Vision takes over with a subject-analysis agent that describes only the main subject - no background, no secondary elements. It starts with the subject type, then physical features, pose, and distinguishing details, and it returns a paragraph beginning with SUBJECT:. If the main subject is a person, the agent is told to go deeper: face, hair, makeup, body, fitness, pose, clothing. And there's an only_main toggle for the case where there's more than one subject - flip it off and the node switches to a plural-agent that describes every subject and their interactions. That's the whole clever bit: one boolean changes the agent from "describe the one thing" to "describe the people and how they relate."
The inputs that matter
text_prompt- your subject description for manual mode. The default "A cat with a hat" is fine to keep if you just want to move on.use_image- the mode switch. Off: pure pass-through, free. On: Gemini reads your image, billed per run.only_main- true by default. Turn it off only when the image has multiple subjects you want described individually.image- a file dropdown with an upload widget, not an IMAGE tensor socket.
Then the standard pack cluster: api_key, model (gemini-2.5-flash), max_tokens, temperature. Single output: subject.
Install & gotchas
Pack-wide install, once:
cd ComfyUI/custom_nodes
git clone https://github.com/Cyrostar/Artha-Gemini
cd Artha-Gemini
pip install -r requirements.txt
Restart ComfyUI, or search "Artha-Gemini" in ComfyUI Manager. Light dependencies (google-genai, Pillow, numpy, torch, soundfile), no model downloads. A Gemini API key from Google AI Studio is required only for use_image mode.
The usual family traps apply: image is a file picker, not an image socket - upload a file or select one from your ComfyUI/input folder, don't wire a Load Image node into it. Image mode is a billed call every run. And the plain-text-key warning again: api_key lives in your workflow JSON, so prefer the pack's api.json (gemini_api_key) or a GEMINI_API_KEY environment variable. One thing worth knowing that isn't obvious: the manual mode's pass-through means this node is the cheapest way to test the pack - no key, no tokens, instant - and it only starts costing you when you hand it a photo.
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, and there's no randomness. Conversely, a high temperature injects a high degree of randomness into the tokens selected by the model, leading to more unexpected, surprising model responses. |
| use_image | BOOLEAN | false | β |
| only_main | BOOLEAN | true | β |
| image | COMBO | 1 options: example.png |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| subject | ARTHASUBJECT | β |