ComfyUI Node

SDWebUIRequestPayload

The txt2img settings form for an A1111 backend

By DiaoDaiaChan·Created 2 years ago·Updated 11 months ago· 7
SDWebUIRequestPayload
    • payload
    • payload_dict
    promptprompt here
    negative_promptnegative prompt here
    seed-1
    sampler
    batch_size1
    n_iter1
    steps20
    cfg_scale7.00
    width512
    height512
    denoising_strength1.00
    scheduler
    send_imagestrue
    save_imagestrue
    override_settings
    override_settings_restore_afterwardsfalse

    If SDWebUI_Request is the bridge to your AUTOMATIC1111 backend, SDWebUI_Request_Payload (shown as SDWebUIRequestPayload) is the control panel on the ComfyUI side of that bridge. It's a form for everything A1111's txt2img tab lets you set - prompt, sampler, steps, CFG, resolution, batch settings - and it packages it into a payload object that the request node ships over the wire.

    Reach for it whenever you're driving A1111 from ComfyUI and you want the ordinary, everyday generation settings without touching any of the exotic stuff. It covers maybe 90% of what a normal txt2img run needs. The exotic stuff is what the PayloadExtend sibling node is for.

    How it works

    The node is a straightforward JSON builder. It takes your inputs and constructs a BaseRequest object, then gives you two views of it: the typed payload (BaseRequest) for the request node, and a payload_dict (DICT) with the exact key/value pairs that will be sent to A1111's /sdapi/v1/txt2img. If you're ever unsure what's actually going over the wire, the dict output is the honest answer.

    One detail worth knowing: override_settings is entered as a JSON string, and the node parses it with json.loads before it goes into the payload. So {"sd_model_checkpoint": "dreamshaper.safetensors"} works, but a plain sentence in that box will throw a JSON parse error at execution.

    The inputs that matter

    • prompt (required) and negative_prompt - same as anywhere else in the ecosystem.
    • sampler - the full A1111 sampler menu: Euler a, DPM++ 2M, DPM++ SDE, DPM++ 2M SDE Heun, and friends, plus LCM and a few curveballs. These are A1111's exact sampler names, so a sampler you see here matches what you'd pick in the webui dropdown.
    • scheduler - Automatic, Karras, Exponential, SGM Uniform, etc. Note this maps to A1111's scheduler setting; Automatic is the safe default.
    • steps (20), cfg_scale (7), width/height (512×512), seed (-1).
    • batch_size vs n_iter - classic A1111 confusion: batch_size is images per iteration (they share the sampler's state), n_iter is how many batches to run. For grid-friendly output, bump n_iter rather than batch_size.
    • send_images / save_images - whether A1111 returns images over the API and saves them to its own output folder. If you set send_images false, the request node gets nothing back.
    • denoising_strength - 1.0 by default; lower values matter mainly when you layer this onto img2img-style workflows.

    Install

    One install for the whole pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DiaoDaiaChan/ComfyUI_API_Request
    

    or search "ComfyUI_API_Request" in ComfyUI Manager, then restart ComfyUI. The only extra dependency is python-dotenv; nothing heavy, no model downloads - the models live in your A1111 install.

    Common issues

    The JSON-in-a-string override_settings box is the top gotcha - one stray quote and the whole payload fails to build. Beyond that, most confusion is about state: A1111 applies whatever checkpoint is currently loaded in its own UI unless your override_settings forces one, so a payload that ignores your "wrong model" results is usually an A1111-side state problem, not a node problem. And remember this node only builds the request - nothing happens until you connect the payload to SDWebUI_Request and run it against a live backend.

    CategorySDWebUI-API/SDWebUI-API

    Inputs (16)

    NameTypeDefaultDescription
    promptSTRINGprompt here
    negative_promptoptSTRINGnegative prompt here
    seedoptINT-1
    sampleroptCOMBO25 options: DPM++ 2M, DPM++ SDE, DPM++ 2M SDE, DPM++ 2M SDE Heun, DPM++ 2S a, DPM++ 3M SDE, +19
    batch_sizeoptINT1
    n_iteroptINT1
    stepsoptINT20
    cfg_scaleoptFLOAT7.00
    widthoptINT512
    heightoptINT512
    denoising_strengthoptFLOAT1.00
    scheduleroptCOMBO8 options: Automatic, Karras, Exponential, SGM Uniform, Simple, Normal, +2
    send_imagesoptBOOLEANtrue
    save_imagesoptBOOLEANtrue
    override_settingsoptSTRING
    override_settings_restore_afterwardsoptBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    payloadBaseRequest
    payload_dictDICT