Nodes/ComfyUI-Cloud-APIs/ReplicateFluxAPI
ComfyUI Node

ReplicateFluxAPI

Flux Pro in your local graph, billed by the image — ReplicateFluxAPI

By BetaDoggo·Created 2 years ago·Updated 6 months ago· 38
ReplicateFluxAPI
    • IMAGE
    prompt
    model
    aspect_ratio
    api_key
    seed1337
    cfg_dev_and_pro3.5
    steps_pro25
    creativity_pro2

    The whole point of this node is that you get to type a prompt into your normal ComfyUI graph and get back a FLUX.1 image without ever touching a checkpoint, a text encoder, or a VAE. ReplicateFluxAPI sends your prompt to replicate.com's hosted Flux, downloads the finished PNG, and hands it to you as a regular IMAGE tensor - wire it into a preview, a save node, or a post-processing chain just like a locally generated image. If your GPU is 8GB or less (or you're on a laptop that politely asks why you're doing this to it), this is the difference between using Flux and reading about it.

    It's part of BetaDoggo's ComfyUI-Cloud-APIs pack, which exists because the author was running a 2060 6GB and wanted Flux in his local workflows. The same pack covers fal.ai and Runware; this node is the Replicate flavor.

    How it works

    Pick a model from the dropdown - schnell, dev, pro 1.1, or pro - and the node calls the matching black-forest-labs model on Replicate, passes your prompt, and pulls the first output image back. One honest gotcha before you trust the dropdown: in the current code only schnell and pro map to their real Replicate endpoints. dev and pro 1.1 both fall through to the flux-dev model. So don't expect "pro 1.1" to behave like BFL's newest API tier here - this pack predates it, and it's unmaintained, so that mapping never got fixed.

    Replicate bills per image, not per step, which is worth knowing because the inputs encourage you to push steps around. From the author's own pricing thread: neither provider charges by step.

    The inputs that matter

    You'll actually touch four of these:

    • prompt - your text. Flux wants natural language, not comma soup; the T5 encoder handles full sentences.
    • model - schnell is Apache 2.0 and effectively free-tier fast; dev/pro cost more and look better.
    • aspect_ratio - nine presets from 1:1 to 9:21. No width/height sliders on this node; the ratio is all you get.
    • api_key - a dropdown of the key files you've dropped into the pack's keys folder.

    The rest have sensible defaults. cfg_dev_and_pro (3.5) is Flux guidance - 3.5 is the community-standard starting point, and lots of people find lower values better. steps_pro (25) and creativity_pro (2) are passed through to the dev/pro request; schnell ignores guidance entirely because it's a distilled model that wants 1-4 steps and no CFG.

    The single output, IMAGE, is a normal tensor you can plug into Save Image or anything else.

    Install

    ComfyUI Manager → search "ComfyUI-Cloud-APIs", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/BetaDoggo/ComfyUI-Cloud-APIs
    

    Restart ComfyUI. Then create an account at replicate.com, copy a token from /account/api-tokens, and paste it into a .txt file inside ComfyUI-Cloud-APIs/keys/ (delete the placeholder nokey.txt). The dropdown picks up files there automatically. No models to download - that's the entire pitch.

    Troubleshooting

    • Image never arrives / key errors - the key file is read as plaintext, so make sure there's no trailing newline or whitespace mangling it. Don't commit that folder to git.
    • "pro 1.1" looks like dev - see above; that's the unmaintained mapping, not you.
    • Ran out of free usage - add billing at replicate.com/account/billing. The author's advice, verbatim in spirit: don't automate top-ups. Cloud nodes make it very easy to spend money while you iterate on a prompt.

    One last thing: this pack is archived and not coming back. It still works fine because it's a thin HTTP wrapper, but if it breaks, the fix is a fork, not a fix.

    CategoryComfyCloudAPIs

    Inputs (8)

    NameTypeDefaultDescription
    promptSTRING
    modelCOMBO4 options: schnell, dev, pro 1.1, pro
    aspect_ratioCOMBO9 options: 1:1, 16:9, 21:9, 2:3, 3:2, 4:5, +3
    api_keyCOMBO1 options: nokey.txt
    seedINT13371–16777215
    cfg_dev_and_proFLOAT3.51–10
    steps_proINT251–50
    creativity_proINT21–4

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE