Nodes/ComfyUI Griptape Nodes/Griptape Agent Config: HuggingFace Drivers
ComfyUI Node

Griptape Agent Config: HuggingFace Drivers

Hugging Face serverless inference as a Griptape config

By griptape-ai·Created 2 years ago·Updated about a year ago· 239
Griptape Agent Config: HuggingFace Drivers
    • CONFIG
    ◄prompt_model_commentPrompt Driver►
    ◄modelHuggingFaceH4/zephyr-7b-beta►
    ◄max_attempts_on_fail2►
    ◄temperature0.10►
    ◄seed10342349342►
    ◄use_native_toolstrue►
    ◄max_tokens-1►
    ◄api_token_env_varHUGGINGFACE_HUB_ACCESS_TOKEN►
    ◄embedding_model_commentEmbedding Driver►
    ◄embedding_modelsentence-transformers/all-MiniLM-L6-v2►
    ◄tokenizersentence-transformers/all-MiniLM-L6-v2►
    ◄max_output_tokens512►

    This config runs a Griptape agent against Hugging Face's hosted inference - both a prompt model and an embedding model, no local VRAM required. It's the config for people who already live on the Hub and want their agent to speak the model IDs they already know. It's also the config with the most strings attached, because you're not getting any model you can type: Hugging Face's serverless inference is picky about what it will actually serve.

    How it works

    The node builds a DriversConfig with a prompt driver pointed at a Hugging Face serverless inference endpoint and an embedding driver pointed at another. Both are free-text model IDs, not dropdowns - which is freedom you have to earn. The prompt driver runs the model you name on HF's serverless inference; the embedding driver does the same for embeddings.

    The README is upfront about the constraint: not every model on the Hub works. Only models supported by Hugging Face's serverless inference will run, and because of serverless limitations, only models under 10GB are supported. If you type in a model that doesn't fit that bar, you get an inference error rather than a graceful fallback.

    The inputs that matter

    • model (default HuggingFaceH4/zephyr-7b-beta) - the prompt model ID. This is a good default, actually: small, serverless-friendly, and it'll work out of the box.
    • embedding_model (default sentence-transformers/all-MiniLM-L6-v2) and tokenizer (same default) - the embedding driver's model and tokenizer.
    • max_output_tokens (default 512) - output cap for the prompt driver.
    • api_token_env_var (default HUGGINGFACE_HUB_ACCESS_TOKEN) - HF access token, not the key. Create one at https://huggingface.co/settings/tokens.
    • Shared: temperature, seed, max_tokens, use_native_tools, max_attempts_on_fail.

    Output: single CONFIG.

    Installing it

    One pack, once:

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

    or ComfyUI Manager → search "Griptape" → install. Restart, set your HF token in Settings → Griptape or as HUGGINGFACE_HUB_ACCESS_TOKEN. Shared caveat: griptape[all] pulls a torch build that can clash with ComfyUI's - README troubleshooting covers it.

    Common issues

    • Inference errors on your chosen model - the 10GB / serverless-support limit. The model either isn't served serverless or is too big. Fall back to a known-good small model like the default zephyr-7b-beta.
    • [WARNING]: HUGGINGFACE_HUB_ACCESS_TOKEN is not set - the usual missing-key path; check Settings → Griptape and env var spelling.
    • Rate limits - free serverless inference throttles hard. If your agent suddenly stalls mid-run, that's usually HF rate-limiting, not your workflow.

    The honest take: this is a config you reach for when you specifically want Hugging Face models. The convenience of serverless comes with speed, quota, and compatibility trade-offs - if you're going to be running agents a lot, the OpenAI Compatible config pointed at a local server will feel much more consistent.

    CategoryGriptape/Agent Configs

    Inputs (12)

    NameTypeDefaultDescription
    prompt_model_commentoptSTRINGPrompt Driver—
    modeloptSTRINGHuggingFaceH4/zephyr-7b-betaThe model to use from Hugging Face Hub.
    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.
    api_token_env_varoptSTRINGHUGGINGFACE_HUB_ACCESS_TOKENEnvironment variable for the API token. Do not use your actual API key here.
    embedding_model_commentoptSTRINGEmbedding Driver—
    embedding_modeloptSTRINGsentence-transformers/all-MiniLM-L6-v2The model to use for embeddings.
    tokenizeroptSTRINGsentence-transformers/all-MiniLM-L6-v2The tokenizer to use with the model.
    max_output_tokensoptINT512The maximum number of tokens for the output.

    Outputs (1)

    NameTypeDescription
    CONFIGCONFIG—