Nodes/comfyui_extra_api/Simple Gen Image Interface
ComfyUI Node

Simple Gen Image Interface

A control panel that isn't the point — Simple Gen Image Interface demystified

By injet-zhou·Created 2 years ago·Updated about a year ago· 14
Simple Gen Image Interface
    • model
    • prompt
    • negative_prompt
    • width
    • height
    • seed
    • steps
    • cfg
    • sampler_name
    • scheduler
    • denoise
    • image
    • mask
    model
    prompt
    negative_prompt
    width512
    height512
    seed0
    steps20
    cfg8.0
    sampler_name
    scheduler
    denoise1.00
    img2img_base64

    What this actually is

    Let's get one thing straight up front: Simple Gen Image Interface does not generate anything. It won't load a checkpoint, run a sampler, or decode latents. What it does is hold every "user-facing" generation parameter - prompt, size, seed, steps, CFG, sampler - in one node and pass them all straight through to the nodes that do the work. It's a form, not an engine.

    It ships in comfyui_extra_api, a small pack whose real job is adding HTTP endpoints to ComfyUI's server (/comfyapi/v1/checkpoints, /comfyapi/v1/loras, /comfyapi/v1/pnginfo, image listing/deletion) so an external app can drive ComfyUI without poking at the internals. This node is the in-graph counterpart: one tidy place where an automation client can set the prompt, seed, and size without touching a dozen separate widget nodes.

    For a GUI-only user it's honestly redundant - you can type into the same text boxes on the standard nodes. Where it earns its keep is headless/API setups: build a workflow once, let the client rewrite this node's values on every call.

    How it works

    Read the source and it's ~50 lines of pass-through. All 11 inputs come back out as typed outputs (STRING, INT, FLOAT), ready to wire into a normal sampling chain:

    • modelLoad Checkpoint's ckpt_name
    • prompt / negative_promptCLIP Text Encode
    • width / heightEmpty Latent Image
    • seed, steps, cfg, sampler_name, scheduler, denoiseKSampler (same enums KSampler itself uses)

    Its one real trick is img2img_base64. Give it a base64-encoded image and it decodes it into an IMAGE output plus a MASK (derived from the image's alpha channel, 1 - alpha), which you can feed into a VAEEncode → KSampler img2img flow. Leave it empty and you get a 64×64 white dummy image and an empty mask - the point of those outputs is img2img, not txt2img.

    The inputs that matter

    For a beginner, everything is a slider or text box with sane defaults, so really only two fields bite:

    • model - a dropdown of your checkpoints plus a "none" entry. Pick one. If you leave it none with an empty checkpoints folder, the node falls back to folder_paths.get_filename_list("checkpoints")[0] - which throws an IndexError when there are zero checkpoints. So: have at least one checkpoint installed.
    • img2img_base64 - the gotcha: it must be raw base64, not a data URI. Pasting data:image/png;base64,iVBOR... straight in will blow up on decode, because the code calls base64.b64decode() on the whole string. Strip the data:image/...;base64, prefix first.

    The rest - width, height, seed, steps, cfg (default 8.0, an old SD 1.5 habit; guidance-distilled models want ~1), sampler, scheduler, denoise - behave exactly like the same fields on a KSampler.

    Installing it

    Two options, both standard:

    cd ComfyUI/custom_nodes
    git clone https://github.com/injet-zhou/comfyui_extra_api
    cd comfyui_extra_api
    pip install -r requirements.txt   # or: poetry install
    

    …then restart ComfyUI. Or use ComfyUI Manager → "Install Custom Nodes" and search "ComfyUI Extra API". Good news on dependencies: the pack only needs diskcache and tqdm - no torch extras, no model files to download. The API routes register on ComfyUI's own server at import, so once it's installed the /comfyapi/v1/* endpoints are just there.

    Troubleshooting

    • "Invalid base64-encoded string" → data URI prefix, see above. Strip it.
    • IndexError on the model dropdown → no checkpoints in ComfyUI/models/checkpoints. Drop one in and hit Refresh.
    • You wired the image/mask into a real img2img and got a white squareimg2img_base64 was empty, so you got the 64×64 dummy. Only use the image/mask outputs when you're actually feeding a base64 image in.

    Honest verdict: it's a convenience node for API-driven ComfyUI, and a reroute-with-extra-steps in the GUI. If you're building an automation layer it's tidy; if you're just making images in the browser, you don't need it.

    Categoryextrapi

    Inputs (12)

    NameTypeDefaultDescription
    modelCOMBO1 options: none
    promptSTRING
    negative_promptSTRING
    widthINT51264–4096
    heightINT51264–4096
    seedINT00–18446744073709550000
    stepsINT201–10000
    cfgFLOAT8.00–100
    sampler_nameCOMBO44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
    schedulerCOMBO9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3
    denoiseFLOAT1.000–1
    img2img_base64STRING

    Outputs (13)

    NameTypeDescription
    modelSTRING
    promptSTRING
    negative_promptSTRING
    widthINT
    heightINT
    seedINT
    stepsINT
    cfgFLOAT
    sampler_nameSTRING
    schedulerSTRING
    denoiseFLOAT
    imageIMAGE
    maskMASK