Nodes/KIE.ai Nodes Next/FLUX 3 Klein Text to Image
ComfyUI Node

FLUX 3 Klein Text to Image

A prompt rewriter that's on unless you say no

By felipederosilva·Created 2 months ago·Updated 3 days ago· 3
FLUX 3 Klein Text to Image
    • image
    • url
    • all_urls_json
    • task_id
    • raw_json
    • credits_consumed
    • credits_left
    ◄promptA corgi wearing a yellow rain hat sitting on wet stone steps after the rain, shallow depth of field►
    ◄aspect_ratio1:1►
    ◄resolution1K►
    ◄output_formatpng►
    ◄num_images1►
    ◄enhance_prompttrue►
    ◄width0►
    ◄height0►
    ◄seed0►
    ◄nsfw_checkerfalse►
    ◄timeout_seconds1200►
    ◄callback_url►

    Nine aspect ratios, up to 4K, up to four images per call, and an enhance_prompt switch that is on by default and quietly rewrites your carefully-worded prompt before the model ever sees it. That last one is the whole story of this node. Everything else is a text-to-image call to FLUX 3 Klein through KIE.ai.

    What it is

    The text-only half of the pack's FLUX 3 Klein pair: KIE_Next_flux_3_klein_text_to_image_a6c6b792 takes a string and returns IMAGE tensors. Klein is the small/fast tier of the FLUX 3 line, and as of now there is no open checkpoint with that name to put on your own GPU - BFL's FLUX 3 announcement put image generation behind "APIs and private weight access", and the community's question about a FLUX 3 Klein got answered with "there is no flux 3 Klein?" So this is the only way most people will touch it.

    Treat it as the drafting node in your graph: cheap-ish, quick, and good at following a described scene. When you've picked a frame, hand it to a local upscaler or to the edit node for the last 10%.

    How it works

    The KIE Next pack builds a ComfyUI node per KIE Market operation and version, straight from KIE's documentation - that's why this thing has a hashed class name instead of a nice tidy one, and why the inputs look like a provider request form rather than a sampler. On execution it assembles the request, creates the task, polls until timeout_seconds (default 1200 seconds), then downloads the first result into a tensor. Credits spent and remaining land on the node face and on two output sockets.

    No model runs locally. Your prompt goes to KIE, KIE calls the model, you download a PNG. That's the deal, and it's the same deal as every API-wrapper node in ComfyUI - the appeal is precisely that the model isn't on your machine.

    The inputs that matter

    prompt is required and takes up to 5000 characters. The pack's default is a quite good example of the style these models like: "A corgi wearing a yellow rain hat sitting on wet stone steps after the rain, shallow depth of field." Specific subject, specific setting, one photographic cue. Do that.

    aspect_ratio is the enum you'll actually touch - 1:1 default, then 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21. resolution is 1K/2K/4K. output_format is png/jpeg/webp, and png is the right default if the result stays in ComfyUI.

    width and height are the escape hatch from the enums: set both (256–4096, ratio between 1:2.5 and 2.5:1) and the node says aspect_ratio and resolution are ignored. Don't set one without the other.

    num_images runs 1–4. seed gives you repeatability. nsfw_checker defaults off, which per the tooltip means no extra filtering layer is applied on top of whatever the model does itself.

    And enhance_prompt, default true: "Rewrites the prompt into a fuller description before generating, which noticeably improves quality." That's KIE's claim, and for a loose two-line idea it often holds. But a rewrite is a rewrite - if you're chasing a precise composition or you're matching a prompt you already tuned locally, turn it off and compare. It's the difference between the model seeing your words and the model seeing someone's expansion of them.

    Outputs

    image is the frame, ready for Save Image, a local upscale, or the Klein Edit node's image_urls socket. url is the remote copy, all_urls_json holds every URL the task produced - important, because with num_images above 1 only the first preferred URL becomes the IMAGE output, so the extras only exist in that JSON and in raw_json. task_id is what KIE • Reuse Completed Image/Video/Audio wants if you need to pull the same result again without paying twice. credits_consumed and credits_left are your cost readout.

    This node isn't an output node, so nothing runs until something downstream eats the image.

    Installing it

    Manager search for "KIE.ai Nodes Next", or:

    comfy node install kie-ai-nodes-next
    

    Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
    pip install -r requirements.txt
    

    Restart ComfyUI, then Settings → KIE.ai Nodes Next → Connection and paste your KIE.ai key. The pack validates it before overwriting a saved one, then shows a masked fingerprint and a connected status; the full key never lands in workflow JSON. Environment variables are explicitly not supported, so don't bother exporting one.

    Dependencies are requests, Pillow, numpy, PyYAML. There is nothing to download into models/ and nothing to fit in VRAM.

    Where people get burned

    Billing surprises, mostly. Four images at 4K is four images at 4K, and the node will happily do it. Watch credits_left, use the KIE • Task Board to see what your last twenty tasks actually cost, and keep num_images at 1 while you're iterating on the prompt.

    Second: the sentence in your head about aspect ratios. 21:9 at 1K is a thin strip; if you meant a poster, you wanted 2:3. Check the enum before the run, not after.

    Third, if a node refuses to queue at all, it's usually the missing output connection, not the API. If it fails rather than refuses, right-click → KIE Next · Check inputs & model controls reads the cached documented fields and limits locally, for free, so you can tell a wiring mistake from a provider rejection before you spend another credit.

    CategoryKIE Next/Image/Flux-3

    Inputs (12)

    NameTypeDefaultDescription
    promptSTRINGA corgi wearing a yellow rain hat sitting on wet stone steps after the rain, shallow depth of fieldA text description of the image you want to generate (Max length: 5000 characters)
    aspect_ratiooptCOMBO1:1Aspect ratio of the generated image Options: 1:1; 4:3; 3:4; 3:2; 2:3; 16:9; 9:16; 21:9; 9:21
    resolutionoptCOMBO1KResolution of the generated image Options: 1K; 2K; 4K
    output_formatoptCOMBOpngFormat of the output image Options: png; jpeg; webp
    num_imagesoptINT11–4Number of images to generate
    enhance_promptoptBOOLEANtrueRewrites the prompt into a fuller description before generating, which noticeably improves quality. Enabled by default (also when the parameter is omitted); pass false to turn it off. Applies to both text-to-image and image editing; in editing, the rewrite preserves the intent of the original instruction.
    widthoptINT0256–4096Image width. Both width and height must be passed at the same time. Aspect ratio must be between 1:2.5 and 2.5:1. Once passed, aspect_ratio and resolution are ignored.
    heightoptINT0256–4096Image height. Both width and height must be passed at the same time. Aspect ratio must be between 1:2.5 and 2.5:1. Once passed, aspect_ratio and resolution are ignored.
    seedoptINT00–2147483647Random seed
    nsfw_checkeroptBOOLEANfalseDefaults to false. When false, no additional content filtering is applied and results are returned directly by the model.
    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—