ComfyUI Node

Generate Image API

The cleaner, workflow-shaped cousin of Generate Image

By turnbros·Created 11 months ago·Updated 10 months ago· 0
Generate Image API
    • image
    • metadata
    instance_nameNo instances configured
    positive_prompta majestic dragon flying over a medieval castle
    negative_promptblurry, low quality, distorted
    checkpointnovaRealityXL_illustriousV70.safetensors
    width512
    height512
    steps50
    cfg5.0
    seed12345
    sampler_namedpmpp_2m_sde
    schedulerkarras
    workflow_nametext_to_image
    upscalefalse

    Generate Image API is the sibling of the pack's plain Generate Image node, with one structural difference: instead of sending raw sampling parameters as an ad-hoc payload, it wraps them in a named workflow call. You pick a workflow_name (default text_to_image), the node stuffs your prompts and sampler settings into workflow_params, and the RunPod endpoint is expected to know what to do with that workflow. Same serverless GPU model, same waiting game, more formal contract.

    Its own description says it plainly: "Generate images using RunPod serverless instances via API calls. This node makes external API requests to configured RunPod endpoints." That's the framing - this is the one for when you have a RunPod endpoint built around named workflows and you want your graph to be an explicit API client. If you're on an endpoint that just accepts loose generation parameters, the plain Generate Image node is the more forgiving choice. If your endpoint is organized around workflow templates, this one lines up.

    Inputs that matter

    The sampler panel is nearly identical to Generate Image: positive_prompt/negative_prompt, checkpoint (default novaRealityXL_illustriousV70.safetensors), width/height (64–2048, step 64), steps (default 50), cfg, seed, sampler_name, scheduler, upscale. The differences: there's no batch_size or denoise here, and in their place sit workflow_name (the string naming the endpoint workflow) and upscale. Width/height also step by 64 rather than 16 - coarser but typical for workflow templates.

    The instance_name dropdown works exactly like the rest of the RunPod cluster: it's populated from endpoints configured in ComfyUI's settings file under serverlessConfig.instances (name, endpoint, auth_token). No instances configured, and you're stuck with the "No instances configured" placeholder and a "required" error when you run it.

    Outputs

    • image - the IMAGE tensor, decoded from the endpoint's base64 response.
    • metadata - a STRING of JSON with the echoed parameters, execution time, and status.

    How it works under the hood

    It POSTs {endpoint}/run with the workflow payload, then polls {endpoint}/status/{id} every couple of seconds until the job leaves IN_QUEUE/IN_PROGRESS, with a 900-second timeout. That's the same serverless polling dance as the rest of the pack - budget for cold starts measured in minutes, not seconds.

    Installing it

    ComfyBros installs like any custom node pack. ComfyUI Manager - search "ComfyBros" - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/turnbros/ComfyBros
    

    Then restart ComfyUI. The README's requirements.txt doesn't exist; the declared deps are in pyproject.toml. It lives under ComfyBros/API Nodes/Image Generation.

    Gotchas

    The workflow-name mismatch is the failure mode to watch: if the endpoint doesn't have a workflow called text_to_image (or whatever you type), the job fails server-side and you get an error echoing back the response. Confirm the endpoint's workflow names before wiring this in. And remember the instance setup - the dropdown is populated from your saved RunPod endpoints, so no configured instances means no generation, full stop.

    CategoryComfyBros/API Nodes/Image Generation

    Inputs (13)

    NameTypeDefaultDescription
    instance_nameCOMBONo instances configured1 options: No instances configured
    positive_promptSTRINGa majestic dragon flying over a medieval castle
    negative_promptSTRINGblurry, low quality, distorted
    checkpointSTRINGnovaRealityXL_illustriousV70.safetensors
    widthINT51264–2048
    heightINT51264–2048
    stepsINT501–150
    cfgFLOAT5.01–30
    seedINT12345-1–2147483647
    sampler_nameCOMBOdpmpp_2m_sde22 options: euler, euler_ancestral, heun, heunpp2, dpm_2, dpm_2_ancestral, +16
    schedulerCOMBOkarras7 options: normal, karras, exponential, sgm_uniform, simple, ddim_uniform, +1
    workflow_nameSTRINGtext_to_image
    upscaleBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    imageIMAGE
    metadataSTRING