SDWebUIRequest
Remote-control your A1111 install from the ComfyUI graph
- payload
- payload_extend
- image
Here's the situation this node is for: you've got a perfectly good AUTOMATIC1111 (stable-diffusion-webui) install - models, LoRAs, extensions, all tuned - and you'd rather not rebuild it in ComfyUI. But you want to drive it from a ComfyUI workflow. SDWebUI_Request (shown as SDWebUIRequest) is the bridge: it takes a payload built by the pack's SDWebUI_Request_Payload node and POSTs it to your running A1111, then converts whatever comes back into a ComfyUI IMAGE.
It's the inverse of the usual ComfyUI setup. Normally ComfyUI does the inference itself. Here, A1111 is the inference engine and ComfyUI is just the front-end and glue. That's genuinely useful when your SD1.5/SDXL setup with all its extensions and regional prompting lives in A1111, or when you want ComfyUI's workflow system orchestrating a backend that runs on a different machine.
How it works
The node calls A1111's /sdapi/v1/txt2img endpoint - the JSON API that ships with AUTOMATIC1111, exposed when the webui is launched with --api. It sends your payload as the request body, gets back a response whose images array is base64-encoded PNGs, decodes each one, and stacks them into an IMAGE tensor. From there it behaves like any other image-producing node: wire it to PreviewImage or SaveImage.
The mechanism matters because it's a network call to a running server, not a local computation - the backend_url is doing real work.
The inputs that matter
- payload (required): a
BaseRequest, built bySDWebUI_Request_Payload(the basic txt2img settings) - this is the node you connect here. - backend_url: defaults to
http://127.0.0.1:7860, which is A1111's default port. If your webui is on a different port or a different machine, this is where you point it. - payload_extend (optional): a
TXT2IMGRequestExtendfromSDWebUI_Request_PayloadExtend, meant to bolt on hires fix, refiner, and the other advanced A1111 fields.
The one output is image - an IMAGE tensor.
The trap: payload_extend doesn't actually do anything yet
This is worth saying plainly because the UI promises more than the code delivers. In the version of the pack that ships (v1.0.2), the request function's signature is sdweb_generate_image(payload, backend_url) - it never reads payload_extend. Connect an extend payload and, depending on your ComfyUI version, you'll either get a TypeError about an unexpected keyword argument or the extend data will simply be dropped. Either way, the hires-fix and refiner fields you set in SDWebUI_Request_PayloadExtend are not reaching A1111. The node exists in the pack and the payload-builder produces it; the wiring just isn't there yet. Build around it until the pack updates.
Install
Same install as the whole pack - one clone, six nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/DiaoDaiaChan/ComfyUI_API_Request
or find it in ComfyUI Manager, then restart. No heavy dependencies (python-dotenv is the only pip requirement) and no model files - the models are on your A1111 install.
Common issues
The most common failure is the node doing nothing because A1111 isn't actually accepting API calls: launch it with --api and make sure it's listening on the port in backend_url. If you moved A1111 to another port or run it in a Docker container, the default URL won't reach it. And keep the two UIs' state separate in your head - whatever checkpoint A1111 has selected in its UI at request time is what gets used, unless your payload's override_settings says otherwise, so a "wrong model" result is often just a stale A1111 setting.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| payload | BaseRequest | — | |
| backend_url | STRING | http://127.0.0.1:7860 | — |
| payload_extendopt | TXT2IMGRequestExtend | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |