Nodes/babydjac Nodes/Flux Lambda Prompter
ComfyUI Node

Flux Lambda Prompter

Flux Prompt Pairs From a Lambda-Hosted LLM

By babydjac·Created 7 months ago·Updated 5 months ago· 12
Flux Lambda Prompter
    • STRING
    • STRING
    api_key
    subject_sceneA playful kitten with yarn balls
    modelllama-4-maverick-17b-128e-instruct-fp8
    temperature0.9

    Flux wants two prompts: a tight keyword list for the CLIP-L encoder and a flowing paragraph for T5-XXL. The Flux Lambda Prompter generates both from a single subject line - but instead of calling xAI like its sibling nodes, it uses Lambda (lambda.ai), a hosted GPU-rental-and-LLM provider, and by default runs Meta's llama-4-maverick-17b-128e-instruct-fp8 behind the scenes.

    If you're already paying for a Lambda account, this is a nice way to reuse that key for prompt generation. If you're not, note that this needs a different key and billing than the Grok nodes in the same pack - don't paste your xAI key here and wonder why it 401s.

    How it works

    It does two things at runtime. First it calls GET https://api.lambda.ai/v1/models and pulls the provider's current model list, then verifies that the model id in the widget actually exists - you get a clear "Model not found" error listing the available ids if it doesn't. Then it sends a chat completion asking for two labeled blocks:

    • **Clip_1:** - technical details: camera, lens, lighting, the keyword-y stuff
    • **t5xxl:** - a natural-language scene description

    It splits on those labels and returns two strings. Because the model list is fetched live, the model picker never goes stale - which is also why the node fails fast if the API is down or the key is wrong.

    The inputs that matter

    • api_key - required, and there's no env-var fallback. This is a Lambda key from platform.lambda.ai, not an xAI key.
    • subject_scene - your idea, e.g. the default "A playful kitten with yarn balls."
    • model - defaults to llama-4-maverick-17b-128e-instruct-fp8. It's validated against the live catalog on every run, so you can type any id Lambda hosts.
    • temperature - 0.9 default; this one runs hot by design for creative variety.

    Outputs are two STRINGs that wire into the clip_l and t5xxl sockets of a CLIPTextEncodeFlux node, same as the Flux Dual Prompt Node (Grok) - this is just a different model provider doing the same job.

    Install

    ComfyUI Manager → babydjacNODES, or git clone https://github.com/babydjac/babydjacNODES into ComfyUI/custom_nodes, restart ComfyUI, hard-refresh the browser. The pack has no extra pip deps beyond requests/Pillow/numpy that ComfyUI already ships.

    Troubleshooting

    • "Failed to fetch models" - check the key, then check the network. The node can't even start without listing models first.
    • "Model not found" - the id in the widget isn't in Lambda's current catalog. The error message prints the available ids; copy one.
    • Empty second output - if the model's reply doesn't include the **t5xxl:** label, the split fails quietly and the natural-language half comes back blank. Re-run or rephrase; it's a parsing quirk, not a break.

    One honest caveat: this node is thinner than the pack's Grok-based options - no JSON safety net, just a label split. It's a perfectly good "generate my dual prompt" button, but treat the t5xxl output as the fragile half and glance at it before you hit sample.

    CategorybabydjacNODES/Prompting/Flux

    Inputs (4)

    NameTypeDefaultDescription
    api_keySTRING
    subject_sceneSTRINGA playful kitten with yarn balls
    modelSTRINGllama-4-maverick-17b-128e-instruct-fp8
    temperatureFLOAT0.90–1.5

    Outputs (2)

    NameTypeDescription
    STRINGSTRING
    STRINGSTRING