Nodes/ComfyUI-Artha-Nodes/πŸ”± Artha Gemini Prompter
ComfyUI Node

πŸ”± Artha Gemini Prompter

Turn a throwaway prompt into something a model can work with

By CyrostarΒ·Created 10 months agoΒ·Updated 8 months agoΒ· 0
πŸ”± Artha Gemini Prompter
    • response
    β—„text_promptA cat with a hat.β–Ί
    β—„mediaIMAGEβ–Ί
    β—„api_keyβ–Ί
    β—„modelgemini-2.5-flashβ–Ί
    β—„max_tokens5000β–Ί
    β—„temperature0.7β–Ί
    β—„system_instructionβ–Ί

    Artha Gemini Prompter is the "enrichment" node: you give it a bare-bones idea and it hands back a full, detailed prompt. Type "a cat with a hat" and get back a paragraph about a tabby in a tweed flat cap, golden-hour light, shallow depth of field, and a slightly smug expression. It's the easiest way to stop under-prompting, and it's the node that most directly answers a question that comes up constantly in the ComfyUI community: people run Gemini (or any LLM) inside their graphs purely as a prompt enhancer, feeding the enriched text into their image model before it ever sees the sampler.

    That's exactly the niche this fills - a turnkey version of the "LLM as prompt-rewriter" workflow, with the system prompt already written.

    What you set

    • text_prompt - your raw prompt. Defaults to "A cat with a hat."
    • media - IMAGE or VIDEO. This isn't just a label: it picks which built-in agent prompt gets used. The image agent is a "Prompt Re-architect" that converts old-style keyword soup into flowing, descriptive sentences with explicit spatial language ("in the foreground," "to the left of"). The video agent does the same for video prompts, where you want motion and temporal language.
    • system_instruction - optional. Leave it blank to use the built-in agent; fill it in to override.
    • The pack's standard api_key, model (default gemini-2.5-flash), max_tokens, temperature.

    One output: response, the enriched prompt as a string. Feed it into your text encoder - and remember, the richer, sentence-based output is aimed at models that read prompts as instructions (LLM-encoded image models), so pair it accordingly.

    How it works

    Under the hood the media choice swaps between two agent files (enrich_image.txt and enrich_video.txt) that ship with the pack. Both share the same philosophy: don't copy keywords, translate intent, weave the style and mood into the narrative rather than appending them. The image agent explicitly targets the "keyword soup" style - that's a direct nod to the SD 1.5/SDXL tag-prompting era, and it's the right instinct for modern text-to-image models that respond to complete sentences.

    The output is clean prose with the * and # characters stripped, ready to paste. It doesn't produce a description of an image you provide - this node has no image input. If you want analysis of a reference image, you want Artha Gemini Vision instead; Prompter is strictly text in, text out.

    Practical notes

    The temperature default of 0.7 gives you variety between runs. If you want the same enrichment every time, drop it toward 0. Every run is a paid API call, and if response comes back empty, that's the pack's signature failure - check the ComfyUI console for the swallowed error. Key resolution is standard: api_key field, then api.json in the pack folder, then GEMINI_API_KEY.

    One real-world tip: this node pairs beautifully with Artha Gemini Condense. Enrich first, then condense to your model's word budget - you get the depth without the bloat.

    Install

    Part of the one-install πŸ”± 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 install "Artha" via ComfyUI Manager. Grab a key from Google AI Studio - enrichment is cloud-backed and won't run without one.

    CategoryArtha/LLM/Gemini

    Inputs (7)

    NameTypeDefaultDescription
    text_promptSTRINGA cat with a hat.β€”
    mediaCOMBOIMAGE2 options: IMAGE, VIDEO
    api_keySTRINGAPI key will be visible in plain text. Consider adding your api to the api.json located inside this custom node folder.
    modelCOMBOgemini-2.5-flash5 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash, gemini-2.0-flash-lite
    max_tokensINT50001–8192For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60–80 English words.
    temperatureFLOAT0.70–2A temperature of 0 means only the most likely tokens are selected. Higher values increase randomness.
    system_instructionoptSTRINGβ€”

    Outputs (1)

    NameTypeDescription
    responseSTRINGβ€”