Nodes/Comfyui-zhenzhen/zhenzhen-gpt-image-2-official_ratio_stable
ComfyUI Node

zhenzhen-gpt-image-2-official_ratio_stable

The stable gpt-image-2 ratio node, now with custom sizes

By T8mars·Created about a year ago·Updated 3 days ago· 749
zhenzhen-gpt-image-2-official_ratio_stable
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • image7
  • image8
  • image9
  • image10
  • image11
  • image12
  • image13
  • image14
  • image15
  • image16
  • mask
  • image
  • image_url
  • response
◄prompt—►
◄aspect_ratioempty►
◄resolution1k►
◄api_key►
◄modelgpt-image-2►
◄n1►
◄qualityauto►
◄backgroundauto►
◄output_formatpng►
◄output_compression100►
◄moderationauto►
◄response_formaturl►
◄async_modetrue►
◄webhook►
◄max_poll_attempts300►
◄poll_interval5►
◄max_retries5►
◄initial_timeout900►
◄seed0►
◄skip_errorfalse►
◄custom_width2560►
◄custom_height1280►

A gpt-image-2 official-ratio node, minus the flakiness and plus custom dimensions. Comfly_gpt_image_2_official_ratio_stable is the "stable" sibling of the official-ratio node: same lineup of ratio presets, same resolution tiers, same sixteen reference images and mask - but the README's changelog shows it arriving later, explicitly as the hardened version, and then getting custom size support (which the original ratio node doesn't have). If you've been fighting the official route, this is the one to try.

What "stable" means here, in practice: it runs the same official gpt-image-2 endpoints through the relay, but with the refined polling and error handling the author built up after months of the official nodes misbehaving - plus the custom aspect ratio, where custom_width and custom_height take over. One gotcha the changelog calls out: when you go custom, single-side dimensions must be divisible by 32 (the earlier note said 16; the stable node's custom mode expects 32-divisible sides). 1280×720? Fine. 1279×720? Waste a credit on an error.

Inputs in brief

  • prompt, aspect_ratio (twelve options - empty, the usual ratios, 21:9, and custom), resolution (1k/2k/4k).
  • image1–image16 plus mask for reference-heavy edits.
  • model - gpt-image-2, -all, -2K, -4K; n 1–10; quality; background; output_format; output_compression; moderation; response_format (url/b64_json).
  • async_mode (default true) with poll_interval, max_poll_attempts, max_retries, initial_timeout, and an optional webhook.

Outputs: image, image_url, 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.

Same family, same rules

The official-route token-group advice applies verbatim: premium openai优质 group for dependable 2K/4K, default group if you want the cheap-but-flaky lane. The async task flow works the same way - timeout in ComfyUI doesn't mean failure; go check the site's task list. This node is best treated as "the one I reach for when official_ratio gets flaky or I need an exact size," which is exactly how the author positioned it in the changelog. It's not a different model, just a steadier door into the same one.

Categoryzhenzhen/Openai

Inputs (39)

NameTypeDefaultDescription
promptSTRING—
aspect_ratioCOMBOempty12 options: empty, 1:1, 3:2, 2:3, 4:3, 3:4, +6
resolutionCOMBO1k3 options: 1k, 2k, 4k
image1optIMAGE—
image2optIMAGE—
image3optIMAGE—
image4optIMAGE—
image5optIMAGE—
image6optIMAGE—
image7optIMAGE—
image8optIMAGE—
image9optIMAGE—
image10optIMAGE—
image11optIMAGE—
image12optIMAGE—
image13optIMAGE—
image14optIMAGE—
image15optIMAGE—
image16optIMAGE—
maskoptMASK—
api_keyoptSTRING—
modeloptCOMBOgpt-image-24 options: gpt-image-2, gpt-image-2-all, gpt-image-2-2K, gpt-image-2-4K
noptINT11–10—
qualityoptCOMBOauto4 options: auto, high, medium, low
backgroundoptCOMBOauto2 options: auto, opaque
output_formatoptCOMBOpng3 options: png, jpeg, webp
output_compressionoptINT1000–100—
moderationoptCOMBOauto2 options: auto, low
response_formatoptCOMBOurl2 options: url, b64_json
async_modeoptBOOLEANtrue—
webhookoptSTRING—
max_poll_attemptsoptINT30010–1000—
poll_intervaloptINT52–60—
max_retriesoptINT51–10—
initial_timeoutoptINT90060–1200—
seedoptINT00–18446744073709550000—
skip_erroroptBOOLEANfalse开启后,节点失败时不报错、按旧行为返回默认空结果;关闭时(默认)失败直接抛出错误。
custom_widthoptINT256064–8192aspect_ratio选择custom时生效,自定义宽度
custom_heightoptINT128064–8192aspect_ratio选择custom时生效,自定义高度

Outputs (3)

NameTypeDescription
imageIMAGE—
image_urlSTRING—
responseSTRING—