Nodes/ComfyUI Griptape Nodes/Griptape Driver: Leonardo.AI
ComfyUI Node

Griptape Driver: Leonardo.AI

Leonardo.AI's curated model shelf, inside a Griptape driver

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Driver: Leonardo.AI
    • DRIVER
    modeldefault
    use_custom_modelfalse
    custom_model
    api_token_env_varLEONARDO_API_KEY

    Leonardo.AI is the image service that sells style as a menu: instead of wrangling checkpoints, you pick from their hosted models like "Leonardo Anime XL" or "Watercolor sketch" and they handle the rest. Griptape Driver: Leonardo.AI is the bridge that puts that menu inside your ComfyUI graph, so a Griptape agent's image task can generate with Leonardo's models by API.

    The appeal is the model list itself. This driver hardcodes Leonardo's model shelf - the same curated names from their app - and lets you pick one from a dropdown instead of hunting for model IDs. It needs a LEONARDO_API_KEY (from docs.leonardo.ai), and you pay per generation.

    How it works

    Standard pack pattern: this is a configuration node. The DRIVER output plugs into a Griptape Run: Prompt Image Generation Task, which sends the prompt to Leonardo's API and returns the image. Nothing renders here.

    The three required inputs are where the interesting part lives:

    • model - a dropdown of Leonardo's hosted models: Anime XL, Lightning XL, Kino XL, SDXL 1.0, Vision XL, AlbedoBase XL, plus the fun ones (Retro illustrations, Watercolor sketch, ArchDwg). The default is Leonardo's own "default" model. Each entry maps to a model ID under the hood - you don't see the IDs, which is the point.
    • use_custom_model - flip this if you have a model ID that isn't on the shelf.
    • custom_model - where that ID goes when you enable the toggle.

    One optional input: api_token_env_var, defaulting to LEONARDO_API_KEY. Same pack-wide rule as everywhere else - it's the name of the environment variable holding the key, not the key typed into the node. The README points at Leonardo's docs for creating one.

    Installing

    Ships in the ComfyUI Griptape Nodes pack:

    • ComfyUI Manager: search "Griptape" → install ComfyUI-Griptape.
    • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/griptape-ai/ComfyUI-Griptape, then restart.

    Pack dependencies are griptape[all], openai, python-dotenv, plus git-hosted extensions. Torch caveat applies as it does to every Griptape install: if the pack's torch dependency clashes with ComfyUI's build, reinstall torch with the CUDA index per the README.

    Gotchas

    The custom-model path is where people stumble: you must enable use_custom_model or the ID in custom_model is silently ignored - it'll use the dropdown selection instead and produce output that doesn't match what you configured. Also, model availability changes on Leonardo's side; a shelf model can disappear or be renamed, which surfaces as a 404 from the API even though the node still lists it. And as with any hosted service, the fixed dropdown means you're capped at Leonardo's aesthetic - it's a convenient shelf, not a replacement for local control.

    CategoryGriptape/Agent Drivers/Image Generation

    Inputs (4)

    NameTypeDefaultDescription
    modelCOMBOdefaultSelect the model to use for image generation.
    use_custom_modelBOOLEANfalseEnable to use a custom model ID.
    custom_modelSTRINGEnter the custom model ID if 'Use Custom Model' is enabled.
    api_token_env_varoptSTRINGLEONARDO_API_KEYEnvironment variable for the API key. Do not use your actual API key directly.

    Outputs (1)

    NameTypeDescription
    DRIVERDRIVER