zhenzhen-gpt-image-2-official_ratio
Gpt-image-2, every aspect ratio, up to sixteen reference images
- image1
- image2
- image3
- image4
- image5
- image6
- image7
- image8
- image9
- image10
- image11
- image12
- image13
- image14
- image15
- image16
- mask
- image
- image_url
- response
The official_ratio node is the one you want when gpt-image-2 needs to come out at a specific aspect ratio - including the weird ones. Thirteen ratio choices from auto through the cinematic 21:9 and portrait 9:16, three resolutions (1k/2k/4k), and up to sixteen reference images plus an optional MASK for editing. If you're building a consistent visual asset set - a product line, a storyboard, a social-media batch where every image has to fit a specific crop - this is the node.
That "sixteen inputs" number is the standout. Most gpt-image-2 wrappers stop at four or five; this one takes a whole folder's worth and lets the model reason across them. The changelog shows the pack author bumping it from 5 to 16 and adding skip_error, so it's been shaped by real usage.
The inputs that matter
- prompt - the instruction, plus aspect_ratio and resolution - the required core.
- image1–image16 and mask - the reference/edit material. With a mask (MASK tensor) it's a localized edit; without, whole-image.
- model -
gpt-image-2,gpt-image-2-all,gpt-image-2-2K, orgpt-image-2-4K. The-2K/-4Kvariants are the pack's dedicated high-res lanes, added as stable fallbacks. - n - 1 to 10 images per call. Meter runs per image.
- quality, background (
auto/opaque), output_format, output_compression (0–100), moderation. - response_format -
urlorb64_json; the README suggestsurlif you're sending many reference images (lighter payload). - async_mode (default
true) - goes through the relay's async task queue, with poll_interval, max_poll_attempts, max_retries, and initial_timeout controlling the wait. webhook if you want a callback instead.
Outputs: image (IMAGE tensor), image_url, and response.
Install and key
cd ComfyUI/custom_nodes
git clone https://github.com/T8mars/Comfyui-zhenzhen
Restart, or ComfyUI Manager → "Comfyui-zhenzhen". Key from ai.t8star.org.
The part the README yells about
This is an official-route node, and the official route cares about your token group. The README is explicit: for 2K/4K stability you want the openai优质 premium group on your token; the default group silently walks the cheaper reverse-engineered lane and will give you slow or failed high-res jobs. Get the group right on the website before you blame the node. And since async is on by default, remember the timeout rule the pack documents everywhere: if ComfyUI gives up, the job is often still cooking on the server - check the site's async task list and pull the result from there rather than paying twice. Sixteen reference images is a lot of context leaving your machine; treat the node accordingly.
Inputs (37)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | — | |
| aspect_ratio | COMBO | auto | 14 options: auto, 1:1, 3:2, 2:3, 4:3, 3:4, +8 |
| resolution | COMBO | 1k | 3 options: 1k, 2k, 4k |
| image1opt | IMAGE | — | |
| image2opt | IMAGE | — | |
| image3opt | IMAGE | — | |
| image4opt | IMAGE | — | |
| image5opt | IMAGE | — | |
| image6opt | IMAGE | — | |
| image7opt | IMAGE | — | |
| image8opt | IMAGE | — | |
| image9opt | IMAGE | — | |
| image10opt | IMAGE | — | |
| image11opt | IMAGE | — | |
| image12opt | IMAGE | — | |
| image13opt | IMAGE | — | |
| image14opt | IMAGE | — | |
| image15opt | IMAGE | — | |
| image16opt | IMAGE | — | |
| maskopt | MASK | — | |
| api_keyopt | STRING | — | |
| modelopt | COMBO | gpt-image-2 | 4 options: gpt-image-2, gpt-image-2-all, gpt-image-2-2K, gpt-image-2-4K |
| nopt | INT | 11–10 | — |
| qualityopt | COMBO | auto | 4 options: auto, high, medium, low |
| backgroundopt | COMBO | auto | 2 options: auto, opaque |
| output_formatopt | COMBO | png | 3 options: png, jpeg, webp |
| output_compressionopt | INT | 1000–100 | — |
| moderationopt | COMBO | auto | 2 options: auto, low |
| response_formatopt | COMBO | url | 2 options: url, b64_json |
| async_modeopt | BOOLEAN | true | — |
| webhookopt | STRING | — | |
| max_poll_attemptsopt | INT | 30010–1000 | — |
| poll_intervalopt | INT | 52–60 | — |
| max_retriesopt | INT | 51–10 | — |
| initial_timeoutopt | INT | 90060–1200 | — |
| seedopt | INT | 00–18446744073709550000 | — |
| skip_erroropt | BOOLEAN | false | 开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| image_url | STRING | — |
| response | STRING | — |