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

Griptape Prompt Driver: HuggingFace

Zephyr through Hugging Face's serverless API — no GPU, no setup, with caveats

By griptape-ai·Created 2 years ago·Updated about a year ago· 238
Griptape Prompt Driver: HuggingFace
    • 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

    The HuggingFace driver is the wildcard of the pack: instead of picking from a fixed dropdown, you type any model ID from the Hugging Face Hub and it runs through Hugging Face's hosted inference API. That means no local GPU and no provider lock-in - you could run Zephyr today and a different open model tomorrow just by changing a string. In theory it's the most flexible driver here.

    In practice, read the fine print, because the README is unusually honest about the limits. Hugging Face's serverless inference only supports a subset of Hub models: only models under 10GB are supported, and models that don't work with HF's serverless inference won't work here, period. So you're not getting Llama-70B through this. You're getting the small-to-mid open models - and Zephyr-7B, the default, is a perfectly decent entry point for testing whether the whole agent idea works before you spend money elsewhere.

    How it works

    The node builds a Griptape HuggingFaceHubPromptDriver, authenticated with your HF access token, pointed at the model ID you specify. The model runs on Hugging Face's infra, so your GPU stays free for diffusion. Output is a single DRIVER.

    The inputs that matter

    • model - a free-text string, default HuggingFaceH4/zephyr-7b-beta. This is the model ID from the Hub (the org/model-name path), not a friendly name. Check the model card supports serverless inference before you type it.
    • api_token_env_var - env-var name, default HUGGINGFACE_HUB_ACCESS_TOKEN. Get a token at huggingface.co/settings/tokens; free accounts have usage limits on hosted inference.
    • max_tokens - -1 default.

    Standard temperature, seed, use_native_tools, max_attempts_on_fail round it out.

    The honest take

    This is the driver I'd pick for testing an agent workflow, not for shipping one. The model ceiling (10GB) and HF's reliability for hosted inference mean the experience is "good enough to learn, meh for production." If you want small-and-free, Ollama at home is more consistent. If you want big-and-reliable, pay for Anthropic or Google. HuggingFace is the in-between that makes sense when you specifically want to try many different open models without committing to any.

    Installing it

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

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

    Set HUGGINGFACE_HUB_ACCESS_TOKEN in Settings → Griptape or your environment.

    Common issues

    Three specific ways this one bites. Model-too-big: pick anything over ~10GB and HF's serverless inference refuses it - the README calls this out explicitly. Model-not-serverless-supported: some popular models are only available via dedicated inference endpoints, and this driver can't reach those. And token-vs-key: api_token_env_var wants the variable name; also remember an unauthenticated (public) token gets much harsher rate limits than one with your account attached. Pack-wide torch/version issues apply as usual.

    CategoryGriptape/Agent Drivers/Prompt

    Inputs (7)

    NameTypeDefaultDescription
    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 name for the Hugging Face API token. Do not use your actual API key here.

    Outputs (1)

    NameTypeDescription
    DRIVERPROMPT_DRIVER