Nodes/arkennemasis - ChatGPT / Codex / fal AI nodes/arkennemasis fal · Flux Kontext LoRA Text to Image · $0.035/MP
ComfyUI Node

arkennemasis fal · Flux Kontext LoRA Text to Image · $0.035/MP

Using an editing model as a generator, on purpose

By Hishamahmer·Created 3 months ago·Updated 9 days ago· 11
arkennemasis fal · Flux Kontext LoRA Text to Image · $0.035/MP
    • images
    • image_paths
    • timings
    • has_nsfw_concepts
    • seed
    • prompt
    • info
    ◄prompt►
    ◄image_sizelandscape_4_3►
    ◄image_size_width1024►
    ◄image_size_height1024►
    ◄num_inference_steps30►
    ◄seed-1►
    ◄guidance_scale2.50►
    ◄num_images1►
    ◄enable_safety_checkertrue►
    ◄output_formatpng►
    ◄loras►
    ◄accelerationnone►
    ◄max_cost_usd20.0►
    ◄reuse_identical_runtrue►
    ◄extra_json►
    ◄max_concurrent1►

    Yes, the instruction-editing model has a text-to-image endpoint. It sounds like a typo and it isn't - Kontext [dev] is a 12B Flux-line model, and it generates from a prompt like any other Flux checkpoint. The reason this endpoint exists is narrower and more useful than "you can also do t2i": it lets you generate with a Kontext LoRA loaded.

    That matters because the Kontext LoRA library is a closed world. Style LoRAs, the Zoom Out LoRA, depth-reference LoRAs - trained against Kontext, never ported to Qwen-Image-Edit or Klein. If the look you want lives in one of those files, you need a Kontext endpoint, and you need a LoRA field, and you need it in generation mode rather than editing mode. That's this node. $0.035 per megapixel, about three and a half cents.

    The field that justifies the node

    loras takes JSON and the tooltip notes you can list several, merged together. Empty leaves it out. The practical constraint is the one that trips everyone: these must be URLs fal can download, not files sitting in your ComfyUI models/loras folder. Check that the LoRA you want has a fetchable URL before you design a workflow around it - plenty of them only exist as a CivitAI download, and those are effectively unavailable here.

    The rest of the inputs

    prompt is a generation prompt, not an edit instruction. Worth saying because everything else on the endpoint is Kontext-shaped and it's easy to write "remove the person on the left" into a node with no image socket.

    image_size is a combo defaulting to landscape_4_3, with custom plus image_size_width and image_size_height for exact dimensions. Unlike the editing endpoints there's no input image to match, so this is entirely your call.

    num_inference_steps defaults to 30, guidance_scale to 2.5 - Flux guidance, not CFG, and the guidance-distilled caveat applies: pushing it up doesn't improve adherence, it just burns the image at more cost. acceleration at none is your speed lever. seed at -1 for a random draw, pinned when you're comparing prompt variants. num_images up to 4 per call, enable_safety_checker on (disabling requires account-level authorization at fal, and unauthorized requests are checked regardless), output_format defaulting to png.

    When to reach for it instead of plain Flux

    You have a Kontext LoRA and want it in generation mode. The obvious one.

    You want Kontext's specific aesthetic. It came from the same lineage as Flux Dev and it renders a particular kind of image - slightly different from what Flux 2 or Klein produce, and some workflows depend on it.

    You're building a character set. Kontext's architecture concatenates reference images into the model's context rather than injecting adapter embeddings, which is why it held identity across successive edits with minimal drift and why it became the backbone of turnaround-sheet workflows. Generate the sheet, then take it to a Kontext editing node in this pack to restage it, and you're in the pipeline the community built in 2025 and never fully abandoned.

    Where it's the wrong call: cheap prompt-to-image. ArkFal_fal_ai_flux_dev is $0.025/MP and Flux Dev is the more established generator; this endpoint is four and a half cents more at the same size purely for the LoRA field and the family's rendering. If neither of those is your reason, use the cheaper node.

    Outputs

    images and image_paths (file paths under output/fal/fal-ai_flux-kontext-lora_text-to-image/), plus timings, has_nsfw_concepts, seed - the seed actually used, which is how you get back to a good roll - prompt, and info, a JSON string with the request id, cost estimate, saved files and fal's full answer.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Hishamahmer/comfyui-arkennemasis
    

    Restart ComfyUI, or install through ComfyUI-Manager → Install via Git URL. The pack's only declared dependency is httpx, and that's for its Codex nodes; the fal provider talks to fal with Python's standard library. No checkpoints download and no GPU is used.

    FAL_KEY=your-key-from-fal.ai/dashboard/keys
    

    in the .env next to run_nvidia_gpu.bat in the portable build, or in the ComfyUI folder. No node in this pack has a key widget - a key typed into a node is saved verbatim into every workflow file you share.

    Two things to know before you queue

    reuse_identical_run is on by default. Same settings, same prompt, same LoRA JSON and the same saved files still on disk means you get the previous image back and nothing is billed. That's the right default for a workflow you're debugging and an annoying one when you clicked Queue hoping for a fresh take - turn it off for that.

    max_cost_usd default is $20 and it stops the run before upload when the estimate is over; 0 removes the cap. At $0.035/MP a four-image batch at 1024×1024 is about 14¢, so the cap is mostly there to catch a mistake - a custom size of 4096 or a fan-out of forty branches.

    And the licence note, since it applies to everything Kontext-based: the [dev] weights sit under BFL's non-commercial licence, which the v2.0 revision generalised to cover Fill, Canny, Depth, Redux and Kontext together. Fine for personal work; check it before you deliver for a client.

    Categoryarkennemasis/fal/Image/Flux

    Inputs (16)

    NameTypeDefaultDescription
    promptSTRINGThe prompt to generate the image with
    image_sizeCOMBOlandscape_4_3The size of the generated image. 'custom' uses the width and height below.
    image_size_widthINT102416–14142Width in pixels when image_size is 'custom'.
    image_size_heightINT102416–14142Height in pixels when image_size is 'custom'.
    num_inference_stepsINT3010–50The number of inference steps to perform.
    seedINT-1-1–2147483647The same seed and the same prompt given to the same version of the model will output the same image every time. -1 leaves it to the model.
    guidance_scaleFLOAT2.500–20The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.
    num_imagesINT11–4The number of images to generate.
    enable_safety_checkerBOOLEANtrueIf set to true, the safety checker will be enabled. Disabling it requires account authorization; unauthorized requests are always checked, and images flagged as unsafe are returned as black images.
    output_formatCOMBOpngThe format of the generated image.
    lorasSTRINGThe LoRAs to use for the image generation. You can use any number of LoRAs and they will be merged together to generate the final image. JSON. Empty leaves it out.
    accelerationCOMBOnoneThe speed of the generation. The higher the speed, the faster the generation.
    max_cost_usdoptFLOAT20.00–100000Safety cap. If the estimated cost of this run is above this many US dollars the node stops BEFORE sending anything to fal. 0 = no cap.
    reuse_identical_runoptBOOLEANtrueIf these exact inputs (the settings AND the same pictures/clips/audio) were already paid for and the files are still in output/fal, return them instead of paying again - also after a ComfyUI restart. Turn off for a fresh take with the same settings.
    extra_jsonoptSTRINGAdvanced: a JSON object merged into the request last, for any fal field this node has no box for. Example: {"seed": 7}. Leave empty normally.
    max_concurrentoptINT11–32How many paid fal calls may run at the same time in one run, across every fal node. 1 (default) = one after another. This node starts its paid part only while fewer than this many fal calls are running. Once any fal node fails, the ones still waiting are not started, so nothing more is billed.

    Outputs (7)

    NameTypeDescription
    imagesIMAGE—
    image_pathsSTRING—
    timingsSTRING—
    has_nsfw_conceptsSTRING—
    seedINT—
    promptSTRING—
    infoSTRINGJSON: request id, cost estimate, saved files and fal's full answer.