Nodes/arkennemasis - ChatGPT / Codex / fal AI nodes/arkennemasis fal · Flux Schnell · $0.003/MP
ComfyUI Node

arkennemasis fal · Flux Schnell · $0.003/MP

Three-tenths of a cent a megapixel, which is basically free

By Hishamahmer·Created 3 months ago·Updated 9 days ago· 11
arkennemasis fal · Flux Schnell · $0.003/MP
    • images
    • image_paths
    • timings
    • seed
    • prompt
    • has_nsfw_concepts
    • info
    ◄num_inference_steps4►
    ◄prompt►
    ◄image_sizelandscape_4_3►
    ◄image_size_width1024►
    ◄image_size_height1024►
    ◄seed-1►
    ◄guidance_scale3.50►
    ◄num_images1►
    ◄enable_safety_checkertrue►
    ◄output_formatjpeg►
    ◄accelerationnone►
    ◄max_cost_usd20.0►
    ◄reuse_identical_runtrue►
    ◄extra_json►
    ◄max_concurrent1►

    Flux Schnell is Apache 2.0 and runs in one to four steps, so you could just run it locally for free. Given that, why is there a node for the hosted version at $0.003 per megapixel?

    Three reasons, and they're all legitimate. You don't have a GPU. You want it in a workflow that runs somewhere else - a server, a headless machine, a batch job. Or you're throwing away drafts by the hundred and would rather not wait for your card to chew through them. At a third of a cent per megapixel, a 1024×1024 image costs three-tenths of a penny. You can generate a hundred candidate compositions for thirty cents and pick one to redo properly.

    Being honest about the flip side: Schnell is the distilled tier, and the two things people wanted from Flux - variety in faces and trainability - are exactly what the distillation cost it. It's too step-distilled to fine-tune directly, which is why BFL could afford to release it under Apache 2.0 in the first place. Use it for layout, composition, thumbnails, and "does this prompt even work" sanity checks.

    Inputs

    • prompt - natural language. Flux's T5 encoder reads sentences; write them.
    • num_inference_steps - default 4, max 12. Schnell's whole trick is running at 1–4 steps, and the pack exposes the dial rather than pretending it doesn't exist. Going up to 12 mostly costs time.
    • image_size - a preset list (landscape_4_3 default, plus square_hd, square, the portrait presets, and custom), with image_size_width/image_size_height for the custom case. Billing is per megapixel, so this is the price dial: square_hd is 1 MP, a 1536×1536 is over 2 MP and rounds up to three cents.
    • guidance_scale - default 3.5, range 1–20. Yes, Schnell has a guidance box here; the local folklore that Schnell has "no guidance parameter" is about the open-weights inference defaults, not this endpoint.
    • acceleration - none / regular / high. Speed versus quality polish; start at none.
    • num_images (up to 4), seed (pin it with a real number once something works), output_format, enable_safety_checker.
    • The shared money widgets: max_cost_usd, reuse_identical_run, extra_json, max_concurrent.

    What comes back

    images and image_paths, files written under output/fal/fal-ai_flux_schnell/, plus seed as an INT, prompt, timings, has_nsfw_concepts and info - the JSON with fal's request id, the cost estimate and the full answer. If you set acceleration or change size and want to know what it actually cost, info is where you look.

    Install

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

    Or install comfyui-arkennemasis from ComfyUI Manager and restart. Then put the key line in the .env that lives next to run_nvidia_gpu.bat:

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

    There's no key widget on the node deliberately - a typed key would be saved into every exported workflow. And unlike the pack's ChatGPT-based nodes, nothing here needs httpx: the fal wrapper talks HTTP with the standard library.

    The safety-checker quirk

    Worth knowing before you're surprised by it. If enable_safety_checker is on and the model flags the image, you don't get an error - you get a black image. And turning the checker off requires account authorisation on fal's side: unauthorised requests are checked anyway, whatever the widget says. So a black square at three-tenths of a cent isn't a bug in the node; it's a moderation result with a poor user interface.

    Practical notes

    Two failure modes are really habits. First, reuse_identical_run is on by default, so hitting Run twice on an unchanged graph returns the same file from disk rather than paying again - which is what you want in a batch, and the opposite of what you want when you're exploring with a fixed seed. Set seed to -1, or turn the reuse switch off, if you want new pixels. Second, if you stack this node behind a LoRA or an upscaler, remember Schnell's ceiling: it's a fast composition engine, not a finisher. Generate at Schnell, then redo the winner on something with a Pro base.

    Missing key, or an empty fal balance, stops the run before it bills anything - and if ComfyUI is restarted mid-job, the free Recover Result node in the same pack grabs the finished request by id instead of you paying twice.

    Categoryarkennemasis/fal/Image/Flux

    Inputs (15)

    NameTypeDefaultDescription
    num_inference_stepsINT41–12The number of inference steps to perform.
    promptSTRINGThe prompt to generate an image from.
    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'.
    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_scaleFLOAT3.501–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_formatCOMBOjpegThe format of the generated image.
    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—
    seedINT—
    promptSTRING—
    has_nsfw_conceptsSTRING—
    infoSTRINGJSON: request id, cost estimate, saved files and fal's full answer.