π± Gemini Compose
The pack's conductor β assemble a full character prompt from parts
- subject
- scene
- camera
- light
- style
- response
- traits
Gemini Compose is the centerpiece of the Artha-Gemini pack - the node all the others feed into. Where the pack's profile nodes describe one slice of a subject (cloth, scenery, light), Compose is the one that takes the parts and writes a complete, coherent image-composition prompt. It's the difference between owning a bunch of description fragments and actually generating a consistent character.
The pack's pipeline is designed around it: Subject, Scenery, Camera, Light, and Style each output their typed description, and Compose accepts all five as optional inputs. Feed them in, and it produces a finished prompt - plus a traits output with the raw property list, so you can see exactly what went in.
How it works
Compose is one node with three distinct modes, and the mode is set by two booleans:
- No image - the prompt is crafted purely from whatever optional inputs you've wired in (subject, scene, camera, light, style) plus your
text_prompt. If no property list is supplied, it returns an empty response - an intentional fail-safe. - Image +
use_imageon - the image becomes the main reference. Gemini analyzes it and writes the composition from what it sees, covering subject, scene, camera, light, style, and mood, plus face/hair/makeup/body/clothing of the subject(s). - Image +
use_image+reconstructon - the power mode. The image is still the reference, but your wired-in parameters override the image where they conflict. Eye color in the image says green but your Subject input says blue? The prompt says blue. Attributes you specified that are absent from the image get added.
That reconstruct mode is genuinely clever. It's a way to say "use this image, but with my version of the character" - which is the closest thing to character consistency you can get from a pure LLM prompt, and worth a read of the KB's character-consistency essay to understand why that matters.
Inputs that matter
- use_image and reconstruct - the two booleans that choose the mode. Both default off.
- seed - passed through to the API call, so you can reproduce a given composition.
- text_prompt - your instruction to the composer.
- The optional inputs:
subject,scene,camera,light,style- these accept the pack's typed outputs (ARTHASUBJECT, ARTHASCENERY, ARTHACAM, ARTHALIGHT, ARTHASTYLE).
Outputs: response (STRING, the composed prompt) and traits (STRING, the property list). Wire response into your CLIP encoder; keep traits around for inspection or iteration.
Installing it
Via ComfyUI Manager (search Artha-Gemini) or:
cd ComfyUI/custom_nodes
git clone https://github.com/Cyrostar/ComfyUI-Artha-Gemini
cd ComfyUI-Artha-Gemini
pip install -r requirements.txt
No model downloads. You need a Gemini API key from Google AI Studio - Compose always makes an API call, even in no-image mode.
Where people get burned
The biggest confusion is the mode interaction. With use_image on but no image selected, the node will try to open whatever's in the upload picker and error out - and with reconstruct on but no property list wired in, you get the image faithfully described with none of your parameters applied, which isn't what you wanted. Set the toggles deliberately.
The other classic is over-feeding. This node is an assembler, not a garbage can - wire in every optional input with values you actually want, and you'll get a tighter prompt than if you let six sources fight each other. Keep the key out of the workflow (api.json or GEMINI_API_KEY env var - never the plain-text field), and remember that as the pack's workhorse, it burns API tokens fastest of all. It's powerful; it's also the node to test on a single cheap flash call before you commit a workflow to it.
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, 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. |
| seed | INT | 00β18446744073709550000 | β |
| use_image | BOOLEAN | false | β |
| reconstruct | BOOLEAN | false | β |
| image | COMBO | 1 options: example.png | |
| subjectopt | ARTHASUBJECT | β | |
| sceneopt | ARTHASCENERY | β | |
| cameraopt | ARTHACAM | β | |
| lightopt | ARTHALIGHT | β | |
| styleopt | ARTHASTYLE | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| response | STRING | β |
| traits | STRING | β |