π± Artha Gemini Compose
Where the Artha prompt actually gets written
- image
- subject
- scene
- camera
- light
- style
- response
- traits
Artha Gemini Compose is the node where the whole Artha system stops producing ingredients and finally cooks the meal. Every other piece of the prompt pipeline - Artha Gemini Scenery for the scene, Artha Gemini Camera for the lens, Artha Gemini Light for the lighting, Artha Gemini Style for the look, plus a subject - exists to hand this node a typed bundle of attributes, and Compose turns that bundle into one cohesive, grammatically correct description you can paste into a text encoder.
Think of it as the sentence-writer. Its sibling, Artha Gemini Portrait, does the same job but for a single character (face, body, clothing, makeup). Compose is the wider shot: it's built for full image compositions, and its optional inputs are the scene, camera, light, style objects rather than the face/body/cloth/ makeup ones. If you've built out a full scene with the camera and lighting nodes, this is where they all plug in.
The inputs that matter
text_prompt- your free-form steering. It defaults to "Construct a prompt describing an image composition in detail," and it works as an instruction overlay on top of whatever attributes you feed in.seed- passed through to the Gemini call for reproducible-ish outputs. Control-after-generate is enabled, so you can randomize per run.use_image+reconstruct- the vision pair. Connect animageand Compose asks Gemini to analyze it and describe subject, scene, camera, light, style, atmosphere, and mood. Turn onreconstructand your wired-in attributes (scene, camera, light, style) override whatever was inferred from the photo - the pack's own example: image says green eyes, your property list says blue, blue wins.- The typed inputs:
subject(ARTHASUBJECT),scene(ARTHASCENERY),camera(ARTHACAM),light(ARTHALIGHT),style(ARTHASTYLE) - all optional, all produced by other Artha nodes.
Outputs are two strings: response, the finished prompt, and traits, the property list that was assembled from your inputs (handy for debugging what actually went in).
How it behaves
Without an image, Compose builds a property list from whatever typed inputs are connected, drops it into a system prompt that tells Gemini to be a "professional expert in visual composition," and asks for a clean, vivid description. If the property list is empty, it returns an empty response - so wire in at least one source or give it a decent text_prompt. With an image and no reconstruct, the image is the authority and the property list is mostly ignored. With both, you get the merge behavior above.
One tip from real use: the response output is plain, model-agnostic prose. For LLM-encoded image models (Z-Image, Flux 2 Klein, Anima and friends) that's exactly what they want - your prompt is an instruction now, not a tag bag, and descriptive sentences beat comma soup. If you're on an SDXL-lineage model that wants tags, Compose's output is less of a fit.
The gotchas
The whole pipeline needs a Gemini API key - Compose calls the API on every execution. Key resolution is standard for the pack: the node's api_key field, then api.json in the pack folder, then the GEMINI_API_KEY env var. Put it in api.json and leave the field empty. Type mismatches are the other classic trip-up: camera only accepts ARTHACAM-typed objects, so don't try to feed it the raw markdown string output from Artha Gemini Camera - that markdown output is a reference sheet, not the typed object. If response comes back empty, check the ComfyUI console; API errors are printed there, then swallowed.
Install
One install covers the whole π± pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Cyrostar/ComfyUI-Artha-Nodes
cd ComfyUI-Artha-Nodes
pip install -r requirements.txt
Restart ComfyUI (or use ComfyUI Manager β search "Artha"). Grab a key from Google AI Studio, drop it in api.json, and you're writing full compositions without touching the prompt box.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| text_prompt | STRING | Construct a prompt describing an image composition in detail. | β |
| 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. |
| seed | INT | 00β18446744073709550000 | β |
| use_image | BOOLEAN | false | β |
| reconstruct | BOOLEAN | false | β |
| imageopt | IMAGE | β | |
| subjectopt | ARTHASUBJECT | β | |
| sceneopt | ARTHASCENERY | β | |
| cameraopt | ARTHACAM | β | |
| lightopt | ARTHALIGHT | β | |
| styleopt | ARTHASTYLE | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| response | STRING | β |
| traits | STRING | β |