Skip to main content

Overview

Comfyui-Luck-gpt2.0 is a ComfyUI custom node pack contributed by community user luckdvr. It calls APIYI’s GPT image models directly inside ComfyUI. The pack currently ships three image nodes and three prompt-control nodes:
  • Comfyui-Luck gpt-image-2 (official): model dropdown offers gpt-image-2 / gpt-image-2.5-flare / gpt-image-2.5-sunburst, sends real size / quality, supports mask inpainting and up to 16 reference images
  • Comfyui-Luck gpt-2.0 all (reverse): calls gpt-image-2-all, per-call billing, fast, conversational editing
  • Comfyui-Luck gpt-image-2-vip (reverse): calls gpt-image-2-vip, per-call billing, Adobe route
  • Prompt-control nodes: GPT-Image-2 文生图提示词控制器 (text-to-image prompt controller) / 图生图提示词控制器 (image-to-image prompt controller) / 文本停留编辑器 (text pause editor). They use a multimodal model to turn your brief into a structured image prompt, and can pause the workflow for manual edits
2026-09-10 update: GPT-Image 2.5 supported. The official node adds gpt-image-2.5-flare (speed first) and gpt-image-2.5-sunburst (quality and editing precision first), and quality grows to six tiers (new xhigh / max). Node names, IDs, widget order and the default model gpt-image-2 are unchanged, so existing workflows will not switch model or quality on their own. After updating the plugin, pick the model in the model (模型) dropdown. See “Using GPT-Image 2.5 in the node” below.
Project Info
  • 🔗 Source: github.com/luckdvr/Comfyui-Luck-gpt2.0
  • 📜 License: Apache-2.0
  • 👤 Author: luckdvr
  • ⭐ Community contribution built for APIYI. Report API behavior changes or node errors to the repo’s Issues first
How to tell this apart from the author’s other node pack?luckdvr contributes two ComfyUI node packs for APIYI:
  • Luck Nano Banana Pro: calls the Gemini line (gemini-3-pro-image-preview / gemini-3.1-flash-image-preview), emphasizes 14 reference images and engineering-grade retry/timeout
  • Luck GPT-Image 2 (this page): calls the OpenAI line (gpt-image-2 / gpt-image-2.5-flare / gpt-image-2.5-sunburst / gpt-image-2-all / gpt-image-2-vip), emphasizes real size / quality control, mask inpainting and prompt controllers

Core Features

Three nodes, three routes

Official gpt-image-2, reverse gpt-2.0 all and reverse gpt-image-2-vip each cover one route. Pick by budget and need

GPT-Image 2.5 twin models

Switch the official node to gpt-image-2.5-flare / gpt-image-2.5-sunburst; -2026-09-08 dated snapshots are also listed for version pinning

Six quality tiers

quality accepts auto / low / medium / high / xhigh / max; xhigh / max are accepted by the two 2.5 models only

Up to 16 reference images

Official node takes image_01 … image_16; the two reverse nodes take up to 14, for multi-image fusion and style transfer

Mask inpainting

Optional mask input on the official node targets the edit region precisely (transparent area is repainted, opaque area is kept)

Real resolution + custom size

auto / 1K / 2K / 4K presets plus custom sizing (max 3840px per edge, 655,360–8,294,400 total pixels)

Prompt controllers

Default gemini-3.5-flash turns a text brief or up to 5 reference images into a structured image prompt, with an optional pause for manual edits

Built-in timeout & retry

Official node defaults to a 600-second timeout; 408 / 429 / 5xx retry per retry_times, so peak-hour jitter is handled

Supported APIYI Models

The three official models share the same price and parameters and bill per token; both reverse models bill $0.03 per image. For the full official-vs-reverse breakdown see the gpt-image-2.5 / 2 official vs reverse comparison.

Using GPT-Image 2.5 in the node

Update the plugin, fully restart ComfyUI, then switch the model (模型) dropdown on Comfyui-Luck gpt-image-2. Every other widget stays the same. Both 2.5 models support text-to-image, image editing, 16 reference images and mask; the node picks the generations or edits endpoint from mode and whether reference images are connected.
Do not carry quality over unchanged when moving from gpt-image-2 to 2.5. By APIYI’s same-size output-token measurements on 2026-09-09, 2.5 high maps to the old medium, and only 2.5 max maps to the old high. This is a token-budget correspondence, not a pixel-for-pixel quality guarantee. To match the old high budget on 2.5, choose max; at the same budget, 2.5 high / xhigh give you two cheaper middle tiers.
Node-level behavior worth knowing before you build a workflow:
  • No silent downgrade: choosing xhigh / max on the old gpt-image-2, or an invalid model / quality, makes the node raise an error before sending. It never swaps the tier for you
  • Use auto sparingly: auto is a dynamic reasoning tier, so cost and latency for the same prompt drift between tiers. Pick a tier explicitly to control spend
  • Pin dated snapshots in production: gpt-image-2.5-flare-2026-09-08 / gpt-image-2.5-sunburst-2026-09-08 in the dropdown freeze the model version, so an alias change upstream does not move you
  • Keep the 600-second timeout: for 2.5 xhigh / max, 2K / 4K or complex edits, keep the default or raise it. A synchronous request may still be billed after the client times out, and automatic retries can add cost; set retry_times to 1 if you do not want retries

Node Parameters

Comfyui-Luck gpt-image-2 (official)

Widget labels on the panel carry a Chinese suffix, such as api_key (API密钥); the tables below list the English field names only. Four constraints on custom_size: no edge above 3840px, width and height both multiples of 16, long edge / short edge at most 3:1, total pixels between 655,360 and 8,294,400. The ratios 1:4 / 4:1 / 1:8 / 8:1 exceed the official 3:1 limit, so the node snaps them to the nearest legal boundary size; 4K + 1:1 uses 2880x2880 rather than 3840x3840 because the latter exceeds the total-pixel cap.
The node does not send background / moderation / response_format / input_fidelity; all of them fall back to API defaults. For transparent backgrounds and similar options call the API directly, see the transparent background FAQ.

Comfyui-Luck gpt-2.0 all (reverse)

gpt-image-2-all does not accept the size / quality / n / aspect_ratio API fields and the node never sends them; 2K / 4K can only be described in the prompt with no pixel guarantee. url output is usually a temporary CDN link valid for about a day, so re-host it if you need it long-term.

Comfyui-Luck gpt-image-2-vip (reverse)

Same widgets as gpt-2.0 all plus two size controls:
The author built this node against APIYI’s 2026-06-23 notice that size was disabled, so it does not send size by default. On the APIYI side size for gpt-image-2-vip was restored on 2026-07-22 (30 common sizes, see the gpt-image-2-vip docs); the plugin has not caught up yet. To lock real output sizes inside ComfyUI today, use the official node Comfyui-Luck gpt-image-2. Reverse b64_json carries a data:image/png;base64, prefix, which the node decodes automatically.

Prompt-control nodes

  • Both controllers call APIYI POST /v1/chat/completions; the model dropdown offers gemini-3.5-flash / gpt-5.5 / gpt-4o / gpt-4.1-mini / gemini-2.5-flash / gemini-2.5-pro
  • The image-to-image controller only does image understanding and prompt enhancement. For real multi-image reference or fusion, connect the same images to the downstream image node as well
  • The pause editor’s edited_text is a single string for an image node’s prompt; edited_texts is a list output reserved for batch text workflows. After the pause, click Continue on the node. Do not press the main Run button again, or ComfyUI re-queues and re-runs the upstream prompt enhancement

Installation

1

Step 1: Clone into custom_nodes

Inside your ComfyUI install:
Existing users can git pull in that folder to get 2.5 support.
2

Step 2: Install dependencies

3

Step 3: Fully restart ComfyUI

Search Comfyui-Luck in the node palette to find the three image nodes and three prompt nodes. Refreshing the frontend is not enough; restart the process after updating the plugin.
4

Step 4: Configure the APIYI key and domain

  • Visit the APIYI Console → Tokens, create a key (a usage cap is recommended)
  • Paste it into the node’s api_key field
  • Pick one api_base: https://api.apiyi.com/v1 (primary) / https://b.apiyi.com/v1 (mainland China backup). The node accepts the base URL with or without /v1
5

Step 5: Import an example workflow

The repo ships two examples:
  • example_workflow.json: one example per image node (the official one uses size=2048x1152 + quality=high + jpeg), with Chinese Note nodes explaining how to choose
  • example_workflow_gpt_image_2_5.json: a standalone 2.5 example, Flare text-to-image → Sunburst edit → preview, defaulting to 1K + 1:1, quality=high, a 600-second timeout and retry_times=1
API keys in the examples are empty; fill yours in to run. Clear the key before sharing your own workflow.

Usage Examples

Example 1: 2.5 Flare 4K high-quality text-to-image

max is the 2.5 tier with the same token budget as the old gpt-image-2 high; try high or xhigh first if you want faster and cheaper.

Example 2: 2.5 Sunburst mask inpainting

Example 3: Flare text-to-image → Sunburst edit chain

Matches example_workflow_gpt_image_2_5.json in the repo:

Example 4: Reverse conversational image

Example 5: Prompt controller → pause and edit → generate

Queue the run on the final PreviewImage / SaveImage. When the flow stops at the pause editor, edit the text and click Continue on the node. If one image is a subject that must be locked, also connect it to the controller’s subject_image and place it on the image node’s image_01.

FAQ

  • Comfyui-Luck gpt-image-2 (official): real size / quality, native mask, up to 16 references, per-token billing. Choose it when you need exact sizes, local edits or the six 2.5 quality tiers; default to gpt-image-2.5-flare for text-to-image and gpt-image-2.5-sunburst for edits
  • Comfyui-Luck gpt-2.0 all (reverse): per-call billing ($0.03 per image), about 30–60 s, ChatGPT web route. Choose it for iterative edits and strong text rendering when hard size control is not needed
  • Comfyui-Luck gpt-image-2-vip (reverse): per-call billing ($0.03 per image), about 90–150 s, Adobe route. A second reverse route to keep on hand; the plugin does not send size today
  • Full comparison: official vs reverse
No. Node names, IDs, widget order and the default model gpt-image-2 are unchanged, so an old workflow keeps running gpt-image-2 at its original quality. To use 2.5, switch the model (模型) dropdown manually and re-pick quality using the table above.
2.5 re-divided the quality tiers. In APIYI’s same-size measurements on 2026-09-09, 2.5 high outputs about a quarter of the tokens of gpt-image-2 high, matching the old medium; to get the old high budget on 2.5 choose max. Conversely, at the same budget 2.5 adds high / xhigh as two cheaper middle tiers. Run your own prompts once per tier and compare usage.output_tokens before going to production.
The two reverse nodes currently list only gpt-image-2-all and gpt-image-2-vip. The ChatGPT web app behind gpt-image-2-all has been upgraded to Images 2.5, so that model already produces 2.5 images and behaves and costs the same as gpt-image-2.5-all, see the gpt-image-2.5-all docs. gpt-image-2.5-flare-vip / gpt-image-2.5-sunburst-vip are not in the node dropdown yet; call the API directly if you need them.
  1. Confirm the folder sits at ComfyUI/custom_nodes/Comfyui-Luck-gpt2.0
  2. pip install -r requirements.txt completed without errors
  3. Fully restart ComfyUI (refreshing the frontend alone is not enough)
  • The official node defaults to a 600-second read timeout; keep or raise it for 2.5 xhigh / max and 2K / 4K. A 408 Timeout usually means the provider-side generation task timed out, not a wrong node parameter
  • A synchronous request may still be billed after the client times out, and automatic retries can add cost; set retry_times to 1 to disable retries
  • If your server network is slow, see CDN image/video downloads are slow
  • Switch api_base to b.apiyi.com/v1 if the default domain is flaky
The old workflow’s widget order no longer matches the node, so retry_times=3 was read as timeout_seconds=3. Use the current example_workflow.json from the repo, or delete and re-add the node.
Converting prompt into an input socket leaves the old workflow one prompt placeholder short, so the widgets after it shift by one (for example mode reads gpt-image-2, api_base reads 2K). The current node passes validation and restores the shifted values at run time; if the panel still shows them shifted, reload the current workflow or re-add Comfyui-Luck gpt-image-2.
Reverse gpt-image-2-all / gpt-image-2-vip return b64_json with a data:image/png;base64, prefix, while the official gpt-image-2 line does not. All three nodes decode both forms automatically, so wire the output straight into PreviewImage. Details in the official vs reverse comparison.
  1. Check api_key validity and whether it is restricted by group
  2. Make sure the selected model is whitelisted on the token
  3. Balance issues: see Balance seems enough but calls fail

gpt-image-2.5 / 2 (official) docs

flare / sunburst / gpt-image-2 share price and parameters, native 2K/4K, per-token billing

GPT-image-2.5 launch explainer

Flare is faster, Sunburst is more precise; six quality tiers and migration advice

gpt-image-2-all (reverse) docs

ChatGPT web route, $0.03 per image

gpt-image-2-vip (reverse) docs

Adobe route, $0.03 per image, 30 supported sizes

Official vs Reverse comparison

One table for the differences between official and reverse

ComfyUI node collection

Browse more APIYI-adapted ComfyUI nodes

Luck Nano Banana Pro (same author)

luckdvr’s Gemini-line ComfyUI node

APIYI GPT-Image 2 Skills (same models)

AI Agent Skill flavor of the GPT image models

APIYI Console

Manage keys, usage, and groups