Nodes/ComfyUI Griptape Nodes/Griptape Prompt Driver: Google
ComfyUI Node

Griptape Prompt Driver: Google

Gemini inside your graph — flash-fast, free-tier-friendly, and multimodal

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Prompt Driver: Google
    • DRIVER
    modelgemini-2.0-flash
    max_attempts_on_fail2
    temperature0.10
    seed10342349342
    use_native_toolstrue
    max_tokens-1
    top_k250
    google_api_key_env_varGOOGLE_API_KEY
    top_p1.00

    The Google prompt driver is the budget pick of the hosted brains in this pack, and it punches above its price. Gemini 2.0 Flash - the default model - is genuinely fast, genuinely cheap, and genuinely multimodal: it can describe images, which matters a lot in a tool built on top of an image-generation app. If you're experimenting with LLM agents in ComfyUI and don't want to commit a big API budget, this is a great first driver to wire in. The free tier of the Gemini API is surprisingly usable for hobby projects.

    It works like every other driver in the pack: the node constructs a Griptape GooglePromptDriver with your model and sampling settings, and emits it on DRIVER for you to plug into an agent configuration or RAG module.

    The inputs that matter

    • model - dropdown of current Gemini models. Default gemini-2.0-flash; gemini-2.0-flash-lite-preview-02-05 is the cheapest tier, gemini-1.5-pro the heavyweight. Flash is the right default - pro only earns its cost on long reasoning tasks.
    • google_api_key_env_var - env-var name, default GOOGLE_API_KEY. Keys come from AI Studio (makersuite.google.com/app/apikey), and the free tier is genuinely free for light use.
    • top_k (default 250) and top_p (default 0.999) - Gemini's native sampling controls, both reasonably high so output stays close to the model's best guess.
    • max_tokens - -1 default; raise it for long outputs.

    Standard temperature, seed, use_native_tools, and max_attempts_on_fail are all there. Output: DRIVER.

    Why you'd actually pick it

    Beyond price, Gemini's multimodal strength is the sleeper feature here. The pack's image-description and image-query flows work with several models, but Gemini has the most forgiving vision support among the cheap options - feed it a busy reference image and it reliably tells you what's there. Pair that with a prompt driver and you've got a pipeline that looks at an image and reasons about it, which is a genuinely neat ComfyUI trick.

    Installing it

    Pack install, same as always: ComfyUI Manager → GriptapeComfyUI-Griptape, restart, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/griptape-ai/ComfyUI-Griptape
    

    Then set GOOGLE_API_KEY in Settings → Griptape or your environment. Existing environment values show up automatically in the settings page.

    Common issues

    Env-var-name trap, again: the field wants GOOGLE_API_KEY, the name, not the key itself. Also be careful with the older gemini-1.0-pro / gemini-pro dropdown entries - legacy models get retired by Google with short notice, and a deprecated model fails with a "model not found" style error. If that happens, bump to a current flash or pro version.

    Pack-wide: if ComfyUI breaks after install, it's griptape[all] clobbering torch - reinstall with pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu121. Stale griptape shows up as import errors; python -m pip install griptape -U sorts it.

    CategoryGriptape/Agent Drivers/Prompt

    Inputs (9)

    NameTypeDefaultDescription
    modeloptCOMBOgemini-2.0-flash6 options: gemini-2.0-flash, gemini-2.0-flash-lite-preview-02-05, gemini-1.5-pro, gemini-1.5-flash, gemini-1.0-pro, gemini-pro
    max_attempts_on_failoptINT21–100Maximum attempts on failure
    temperatureoptFLOAT0.100–1Temperature for sampling
    seedoptINT10342349342Seed for random number generation
    use_native_toolsoptBOOLEANtrueUse native tools for the LLM.
    max_tokensoptINT-1Maximum tokens to generate. If <=0, it will use the default based on the tokenizer.
    top_koptINT2500–500Limits the number of tokens considered for each step of the generation. Prevents the model from focusing too narrowly on the top choices.
    google_api_key_env_varoptSTRINGGOOGLE_API_KEYEnvironment variable name for the Google API key. Do not use your actual API key directly here.
    top_poptFLOAT1.000–1Controls the cumulative probability distribution cutoff. The model will only consider the top p% most probable tokens.

    Outputs (1)

    NameTypeDescription
    DRIVERPROMPT_DRIVER