Nodes/KIE.ai Nodes Next/Flux-2 - Text to Image
ComfyUI Node

Flux-2 - Text to Image

FLUX.2 prompts without the 56B hardware bill

By felipederosilva·Created about a month ago·Updated a day ago· 3
Flux-2 - Text to Image
    • image
    • url
    • all_urls_json
    • task_id
    • raw_json
    • credits_consumed
    • credits_left
    ◄promptA humanoid figure with a vintage television set for a head, featuring a green-tinted screen displaying a `Hello FLUX.2` writing in ASCII font. The figure is wearing a yellow raincoat, and there are various wires and components attached to the television. The background is cloudy and indistinct, suggesting an outdoor setting►
    ◄aspect_ratio1:1►
    ◄resolution1K►
    ◄nsfw_checkerfalse►
    ◄timeout_seconds1200►
    ◄callback_url►

    FLUX.2 is the strongest open-weights image model on paper and one of the least-run ones at home: a 32B transformer plus a 24B Mistral vision-language encoder, needing 18–24GB even quantized, with Klein arriving months later to fix exactly that. So there's a real case for calling it instead of running it - no 18GB encoder download, no quantizing your way down to something that fits, and the prompt quality you came for.

    This node is the Flex tier of FLUX.2 text-to-image through KIE. Same inputs as the Pro node sitting next to it in the menu; the difference is which model ID KIE runs and what it charges you for.

    How it works

    Your prompt goes to KIE as a hosted job. The node polls until the image is ready, downloads the result, and hands it back as a native ComfyUI IMAGE tensor - so it composites with the rest of your graph exactly like a local sampler would have produced it. That's the whole point of an API-wrapper node: it looks like a checkpoint from the canvas's point of view.

    FLUX.2's prompt style is the modern one - it's an LLM-encoded architecture with a vision-language encoder, so natural, descriptive sentences work better than tag soup. Write it like you're describing a photograph to someone who's going to shoot it.

    Inputs

    prompt is required, and it wants 3–5000 characters. The default in the widget is BFL's own example prompt (a TV-headed figure in a yellow raincoat) - overwrite it.

    aspect_ratio is a dropdown defaulting to 1:1, and it includes auto, which matches the ratio of the first input image. On this text-to-image node there's no image input, so auto has nothing to match - pick the actual ratio you want.

    resolution is a dropdown defaulting to 1K. This is the switch that changes both the bill and the detail, so decide before you batch.

    nsfw_checker defaults to false, and the author's tooltip is unusually direct about what that means: with the filter off, "our content filtering will be disabled, and all results will be returned directly by the model itself." So the default is the permissive setting, and the tooltip warns the filter isn't guaranteed to catch everything anyway. If you're generating for a workplace or a client, turn it on and accept the extra layer; if you're debugging refusals, note that the filter is already off and what you're seeing is the model's own training - FLUX.2's model card documents heavy safety filtering, and the community read that documentation as a censorship changelog.

    timeout_seconds (30–7200, default 1200) and callback_url (leave empty) round it out.

    Outputs

    image is the native IMAGE tensor - wire it into a preview/save node, a detailer, or an upscaler. url is the hosted file, all_urls_json holds every URL in the response, task_id identifies the job, raw_json is the untouched provider response, and credits_consumed / credits_left are floats. After a run the node prints both credit numbers on its own face, which is the fastest way to find out that a 4K batch was a mistake.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
    

    Or ComfyUI Manager, searching "KIE.ai Nodes Next". The dependency list is tiny - requests, Pillow, numpy, PyYAML - which is genuinely funny for a pack that gives you access to one of the heaviest models in the ecosystem. Restart, then add your key once under Settings → KIE.ai Nodes Next → Connection. The pack validates the key against KIE before replacing a saved one, and keeps it out of workflow JSON; KIE_API_KEY overrides it on servers.

    Notes and traps

    • Flex vs Pro is a pricing tier, not a feature tier. Both expose the same knobs here. Start on Flex, move to Pro when the composition matters more than the budget.
    • url is only the first URL. If a provider ever returns more than one asset, all_urls_json is where the rest live - that's why the pack exposes both.
    • Results are archived, not just previewed. Downloads are written under ComfyUI's output/KIE-Results/ with content-hashed names, so a restart doesn't strand a generation you paid for.
    • "Endpoint has not been resolved yet" - the pack generates its nodes from KIE's live docs catalog. Restart or run the catalog refresh node and the deep sync will fill in the missing endpoint.
    CategoryKIE Next/Image/Black Forest Labs/Flux 2

    Inputs (6)

    NameTypeDefaultDescription
    promptSTRINGA humanoid figure with a vintage television set for a head, featuring a green-tinted screen displaying a `Hello FLUX.2` writing in ASCII font. The figure is wearing a yellow raincoat, and there are various wires and components attached to the television. The background is cloudy and indistinct, suggesting an outdoor settingGeneration prompt, length must be between 3-5000 characters. (Maximum length: 5000 characters)
    aspect_ratioCOMBO1:1Aspect ratio of the generated image. When `auto` is selected, it will match the ratio of the first input image (requires input image to be provided).
    resolutionCOMBO1KOutput image resolution.
    nsfw_checkeroptBOOLEANfalseDefaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. Note: There is no guarantee that everything can be filtered out; if you are not satisfied with the results, you will need to make your own arrangements.
    timeout_secondsoptINT120030–7200—
    callback_urloptSTRINGOptional KIE callback URL. Leave empty for normal ComfyUI use.

    Outputs (7)

    NameTypeDescription
    imageIMAGE—
    urlSTRING—
    all_urls_jsonSTRING—
    task_idSTRING—
    raw_jsonSTRING—
    credits_consumedFLOAT—
    credits_leftFLOAT—