Nodes/Bjornulf_custom_nodes/โ˜๐ŸŽจ API Image Generator (FalAI) ๐ŸŽจโ˜
ComfyUI Node

โ˜๐ŸŽจ API Image Generator (FalAI) ๐ŸŽจโ˜

Call fal.ai's hosted models from inside your graph

By justUmenยทCreated 2 years agoยทUpdated about a year agoยท 545
โ˜๐ŸŽจ API Image Generator (FalAI) ๐ŸŽจโ˜
    • image
    • generation_info
    โ—„api_tokenโ–บ
    โ—„modelfal-ai/flux-pro/v1.1-ultraโ–บ
    โ—„promptA blackhole in spaceโ–บ
    โ—„number_of_images1โ–บ
    โ—„seed-1โ–บ
    โ—„timeout300โ–บ

    This node doesn't run on your GPU at all. It's an HTTP client wearing a ComfyUI node's clothes: hand it a fal.ai API token and a prompt, and it calls out to fal.ai's hosted inference, waits for the result, and hands the image back into your graph as a normal IMAGE tensor. That means you can mix a cloud-hosted Flux Ultra generation with the rest of Bjornulf's local text-generator prompt-building system in the same workflow, without touching fal.ai's own UI.

    How it works

    Three models are available: fal-ai/flux-pro/v1.1-ultra (the default), fal-ai/recraft-v3, and fal-ai/flux-general/image-to-image. You supply your own api_token - this node doesn't come with one baked in, and generations are billed by fal.ai directly, on your account, separate from whatever you're paying for local GPU compute. number_of_images lets you request a batch in one call rather than looping the node yourself, and timeout (default 300 seconds, up to 1800) exists because hosted API calls can genuinely take a while, especially under load - raise it if you're seeing timeouts on the pricier models rather than assuming something's broken.

    generation_info is worth paying attention to as an output, not just image. It's the raw response detail from the API call - useful for confirming exactly what settings the service actually used, or for debugging a call that returned something unexpected.

    The inputs and outputs that matter

    • api_token (required, STRING) - your fal.ai token. No token, no generation.
    • model (default fal-ai/flux-pro/v1.1-ultra) - pick between Flux Pro Ultra, Recraft V3, or Flux general image-to-image.
    • prompt (multiline STRING) - what to generate.
    • number_of_images (1โ€“10) and seed (-1 for random) - batch size and reproducibility.
    • timeout (60โ€“1800s, default 300) - how long the node waits before giving up on the API call.
    • Outputs image (IMAGE) and generation_info (STRING) - the result, plus the raw detail behind it.

    How to install it

    ComfyUI Manager โ†’ search Bjornulf_custom_nodes โ†’ install โ†’ restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/justUmen/Bjornulf_custom_nodes
    pip install -r Bjornulf_custom_nodes/requirements.txt
    

    This node specifically needs the fal_client package, which is in the pack's shared requirements.txt - install the full list, not just this node's piece, since the pack ships as one unit.

    Common issues & troubleshooting

    It errors immediately with an authentication failure. Almost always a bad or missing api_token - create one from your fal.ai account and paste it in directly; there's no environment-variable fallback baked into this node.

    It times out on larger requests. Bump timeout past the 300s default, especially if you're requesting multiple images per call or the flux-general/image-to-image model, which can run longer than the fast Ultra tier. A timeout here doesn't mean the generation failed on fal.ai's end - just that this node stopped waiting for the response.

    I'm being charged and don't understand why, since I'm on comfy.icu. This node bills through your own fal.ai account, entirely separate from your GPU platform's credits. The node itself uses essentially no local compute - it's a network call - so whatever cost you're seeing is fal.ai's usage pricing for the model you selected, not GPU time.

    The image doesn't match what I expected from the prompt. Since generation happens entirely on fal.ai's infrastructure, this node has no influence over model behavior beyond the parameters it exposes - troubleshooting prompt adherence is a fal.ai / model question, not something local to this node.

    CategoryFalAI

    Inputs (6)

    NameTypeDefaultDescription
    api_tokenSTRINGโ€”
    modelCOMBOfal-ai/flux-pro/v1.1-ultra3 options: fal-ai/flux-pro/v1.1-ultra, fal-ai/recraft-v3, fal-ai/flux-general/image-to-image
    promptSTRINGA blackhole in spaceโ€”
    number_of_imagesINT11โ€“10โ€”
    seedINT-1-1โ€“2147483647โ€”
    timeoutINT30060โ€“1800โ€”

    Outputs (2)

    NameTypeDescription
    imageIMAGEโ€”
    generation_infoSTRINGโ€”