Chat Image Bridge Advanced
Raw responses, retries, and 14 reference images
- image_01
- image_02
- image_03
- image_04
- image_05
- image_06
- image_07
- image_08
- image_09
- image_10
- image_11
- image_12
- image_13
- image_14
- image
- response
- image_refs
Same engine as the plain ChatImageBridge node, but with the hood up. ChatImageBridgeAdvanced is the debug-and-power variant you pull out when the standard node works for the happy path and you need to know why a relay did something weird, or when a provider needs parameters the standard UI doesn't expose. If the plain node is the daily driver, this one is the diagnostic tool you keep in the drawer - but it's also the only one that'll let you feed 14 reference images to a Gemini-style model, so it's not just for debugging.
What's different
The mechanism is identical under the hood: OpenAI-compatible chat completions (or native Gemini format for Gemini models when resolution/aspect ratio are set), images as base64 PNG data URLs, images recovered from markdown, URLs, b64_json, or inlineData. What Advanced adds is three outputs and a row of request overrides.
The outputs are the headline:
image- the IMAGE tensor, same as the plain node.response- the raw JSON response as a string, so you can actually read what the provider sent back. Wire it to a text viewer or just peek at it. By default it's redacted - giant base64 blobs are replaced with<redacted N chars>- and theredact_responsetoggle controls that.image_refs- a string listing the image references the node decoded, which is gold when a response technically contains an image but the node's parser can't turn it into a tensor.
The inputs worth knowing
Beyond the shared api_key, base_url, model, prompt, resolution, aspect_ratio, and timeout_seconds (default 300, 30–1800), you get:
system_prompt- a system message prepended to the conversation, for providers that respect one.size- a free-form string sent as thesizefield (like3840x2160). The plain node never lets you touch this directly.extra_body_json- a JSON object that gets merged into the request payload, which is how you pass provider-specific fields no UI could predict.retry_times- 1 to 10. The base node fires once; this one will retry with a short backoff (it sleeps up to a few seconds between attempts).redact_response- boolean, default true. Flip it off andresponsewill contain the full base64 payloads, which you will not enjoy scrolling past, but it's there when you need it.
Image inputs run image_01 through image_14. The README notes the relay can technically accept 20, but 14 is the reliable public limit for these models, so that's the cap.
Install
It's part of the Chat-Image-Bridge-Node pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Marigold1122/Chat-Image-Bridge-Node.git ComfyUI-ChatImageBridge
pip install -r ComfyUI-ChatImageBridge/requirements.txt
Restart, then api -> Chat Image Bridge -> Chat Image Bridge Advanced. Or ComfyUI Manager, search "Chat-Image-Bridge-Node". Dependency is just requests.
Troubleshooting
- "extra_body_json must be a JSON object" - it's parsed with
json.loadsand must be an object, not a string or a list. Trailing commas or single quotes will fail. - Huge
responsestrings - if you disabled redaction, expect multi-megabyte outputs when an image comes back asb64_json. That's why the default is on. - Different-sized outputs - if the provider returns multiple images at different sizes, the node keeps the ones matching the first image's size and warns in the console. Most relays return one consistent image, but it's worth knowing where that console line comes from.
- When you've confirmed a weird response via
response, the fix is usually either a differentmodelstring or anextra_body_jsonfield your specific relay needs - which is precisely why this node exists.
Use this one when you're diagnosing or when 14 reference images matter. For everything else, the plain ChatImageBridge is less to look at and does the same job.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| api_key | STRING | — | |
| base_url | STRING | — | |
| model | STRING | gemini-3-pro-image-preview | — |
| prompt | STRING | — | |
| system_prompt | STRING | — | |
| size | STRING | — | |
| extra_body_json | STRING | — | |
| timeout_seconds | INT | 30030–1800 | — |
| retry_times | INT | 11–10 | — |
| redact_response | BOOLEAN | true | — |
| image_01opt | IMAGE | — | |
| image_02opt | IMAGE | — | |
| image_03opt | IMAGE | — | |
| image_04opt | IMAGE | — | |
| image_05opt | IMAGE | — | |
| image_06opt | IMAGE | — | |
| image_07opt | IMAGE | — | |
| image_08opt | IMAGE | — | |
| image_09opt | IMAGE | — | |
| image_10opt | IMAGE | — | |
| image_11opt | IMAGE | — | |
| image_12opt | IMAGE | — | |
| image_13opt | IMAGE | — | |
| image_14opt | IMAGE | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| response | STRING | — |
| image_refs | STRING | — |