Nodes/Fal-Gateway/Fal Text-to-Text
ComfyUI Node

Fal Text-to-Text

A Claude Sonnet 4.5 node in ComfyUI — no local LLM required

By modbender·Created 5 months ago·Updated 3 months ago· 1
Fal Text-to-Text
    • response
    • info
    model_id
    prompt
    system_prompt
    schema
    seed-1

    Drop a node, pick [Anthropic] Claude Sonnet 4.5, and you've got a frontier LLM inside your ComfyUI graph - no GGUF quantization math, no Ollama server, no VRAM budget. Fal Text-to-Text is the pack's LLM node, and it routes through fal's OpenRouter endpoint, which is why the dropdown reads like a best-of list: Claude, GPT-5, Gemini 2.5 Pro, Llama 3.3, DeepSeek R1, Grok, Qwen, Mistral, plus fal's direct LLMs (Bytedance Seed, Nemotron). The curated list refreshes automatically, so new models surface without a code change.

    Before you ditch your local setup: the honest split from the community's own experience is that a local abliterated 8B is still the right call for uncensored, offline, free-per-call prompt rewriting. Where this node wins is genuine frontier-chat quality - a Claude or GPT-5 that actually follows instructions - when you want that inside a workflow and don't care about the API.

    Inputs and outputs

    • model_id - the flat curated dropdown. Pick one model; no second picker. Entries look like [Anthropic] Claude Sonnet 4.5 and the fal-direct models merge in alongside the OpenRouter ones.
    • prompt - the actual job. Multiline.
    • system_prompt - optional, multiline. Goes in as the system message for chat models, instructions for the responses-style ones.
    • schema - the hidden superpower. Leave it empty for free-form text. Fill it with a comma-separated field list - flux_ref_prompt, title, tags - and the response becomes a JSON object keyed by those fields, enforced via OpenRouter's strict response_format. One call, structured output.
    • seed - INT, default -1 (random).

    Outputs: response (STRING) and info (STRING, the full JSON result).

    How it works

    The catalog is synthesized from OpenRouter's live model list, each row dispatching to fal's openrouter/router/openai/v1/chat/completions endpoint with the model ID injected into the payload. The schema widget turns into response_format: json_schema in strict mode. Pair the JSON output with the pack's JSON Extract nodes and one Claude call becomes five named STRING outputs feeding five different parts of your workflow - the classic "LLM writes the video prompts, the title, and the tags in one shot" pattern.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/modbender/ComfyUI-Fal-Gateway
    pip install -r requirements.txt
    export FAL_KEY=your_fal_key
    

    Restart ComfyUI, find the pack under Fal-Gateway. One key for everything.

    Gotchas

    • Not every model honors the schema. Older or smaller models (Claude 3 Haiku, Llama 3.1 8B, Mistral Small) may ignore response_format and return prose anyway - the node sends a system-prompt hint as a fallback, but you should set a default on your JSON Extract node to circuit-break missing fields.
    • LLM nodes are the category that got weaponized once - ComfyUI_LLMVISION shipped credential-stealing malware and ended in a federal prosecution. This pack is open-source, widely-legible, and Apache 2.0, but the general rule stands: read what a node does before handing it your key.
    • Token-priced. The cost badge shows the honest per-token rate rather than a fake total. Long reasoning models (DeepSeek R1) can burn real money on a single "improve this prompt" call.
    • No key → "FAL_KEY not set" hard error.

    This is the node to reach for when you need an actual frontier model doing real reasoning inside the graph - and to skip when a small local model would do, because the local one is free and offline.

    CategoryFal-Gateway

    Inputs (5)

    NameTypeDefaultDescription
    model_idCOMBO3 options: [fal-ai] Bytedance Seed V2 Mini, [nvidia] Nemotron 3 Nano Omni, [openrouter] OpenRouter [Enterprise]
    promptSTRING
    system_promptSTRING
    schemaSTRING
    seedINT-1-1–4294967295

    Outputs (2)

    NameTypeDescription
    responseSTRING
    infoSTRING