S2A Multimodal
Cloud image gen, editing, and captioning in one node
- image_1
- image_2
- image_3
- image_4
- image
- text
The name is a bit of a lie - nothing about this node runs a model on your machine. S2A Multimodal is an API client wearing a ComfyUI costume: you give it a key and a base URL, it calls an OpenAI-compatible relay, and it drops the result back into your graph as if a local sampler had produced it. No VRAM, no checkpoint download, no --port 8188 firewall drama. Just a POST request and a phone bill.
Why you'd bother
This is the "when local isn't the answer" pattern. GPT Image has no open weights, so there is no local door - if you want that class of model in your workflow, you call it. The official ComfyUI Partner Nodes do this too, but they want you logged into a Comfy account on prepaid credits and they split one job across many nodes. This pack is the DIY version: one node, one key, and it handles three jobs that usually need three different nodes - text-to-image, image editing, and vision captioning. That's genuinely rare, and it's the reason to reach for it over the grab bag of per-vendor API wrappers.
How it works
The whole thing is urllib and a lot of trying. Flip mode to text and it packages your prompt plus up to four input images as base64 PNGs and POSTs to /v1/responses, falling back to /v1/chat/completions if the relay prefers the older dialect. Flip to image and the action field picks the route: generate hits /v1/images/generations, then tries a responses call with modalities: ["image"]; edit goes multipart to /v1/images/edits, probing field names image, images, and images[] before falling back to JSON. That endpoint-juggling is the pack's real feature - relays in this ecosystem all speak "OpenAI-compatible" with slightly different accents, and the node just keeps trying until one sticks.
The outputs are the clean part: it always exposes exactly two ports, image (an IMAGE tensor) and text (a STRING). In image mode you wire image onward and text comes back empty; in text mode it's the reverse. The unused port gets a blank 64×64 image or an empty string, so you can leave the graph wired both ways without it breaking.
The inputs that actually matter
base_url- your sub2api or OpenAI-compatible relay address. Trailing slash doesn't matter; the code strips it.api_key- from the relay's account page. There's no local alternative; this node is useless without it.mode-imageortext. This one choice decides everything downstream.action-auto/generate/edit.editrequires at least one image inimage_1…image_4.model- and here's the trap. It's a fixed dropdown:gpt-image-2,gpt-5.5,gpt-5.3-codex. You can't type a custom alias. If your relay maps those exact names, great; if not, you're chasing 404s.
size, quality, and prompt are what you'd expect, and timeout_sec (15–900, default 120) covers the slow relays. Input images get downscaled to roughly 1024px on their longest side before upload (it keys off your chosen size), so you're not shipping 4K PNGs over the wire.
Installing it
ComfyUI Manager → search "sub2api", install, restart. Or the manual way:
cd ComfyUI/custom_nodes
git clone https://github.com/JioJe/comfyui-sub2api
Then restart ComfyUI. The dependency story is nearly nothing - requirements.txt is just Pillow, which every ComfyUI install already ships. No model files, no CUDA, nothing. If a fresh environment complains, python -m pip install -r requirements.txt sorts it.
Where people get burned
The README's error list is refreshingly honest:
- HTTP 401 - key wrong or expired.
- HTTP 404 - the endpoint isn't supported. The node auto-tries alternates; if all of them 404, the relay doesn't speak that dialect or that model alias.
No image found in API response- the relay answered but returned nob64_json/url/result. That's almost always a model that doesn't do image output; the error message even nudges you toward an image-capable alias.- Timeout - bump
timeout_secor feed in fewer/smaller images.
One more thing, and it's the whole security story in two sentences: this is a node that ships a key and calls the network by design, which is exactly the shape the ecosystem's one famous malware incident wore. It's a single small file - read it once before you paste anything into it, and don't use a relay you don't trust.
Verdict: if you already pay for a sub2api-style relay, this is the cleanest way to pull GPT-class image generation and editing into ComfyUI without Comfy Cloud credits. If you don't, the fixed model dropdown and "your relay must match" reality make it a hard sell - it's a pack for people already inside that ecosystem.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 2 options: image, text | |
| base_url | STRING | — | |
| api_key | STRING | — | |
| model | COMBO | 3 options: gpt-image-2, gpt-5.5, gpt-5.3-codex | |
| prompt | STRING | Describe or edit this image. | — |
| action | COMBO | 3 options: auto, generate, edit | |
| size | COMBO | 4 options: 1024x1024, 1024x1536, 1536x1024, auto | |
| quality | COMBO | 4 options: low, medium, high, auto | |
| timeout_sec | INT | 12015–900 | — |
| image_1opt | IMAGE | — | |
| image_2opt | IMAGE | — | |
| image_3opt | IMAGE | — | |
| image_4opt | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| text | STRING | — |