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 offersgpt-image-2/gpt-image-2.5-flare/gpt-image-2.5-sunburst, sends realsize/quality, supports mask inpainting and up to 16 reference imagesComfyui-Luck gpt-2.0 all(reverse): callsgpt-image-2-all, per-call billing, fast, conversational editingComfyui-Luck gpt-image-2-vip(reverse): callsgpt-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
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.- 🔗 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
Core Features
Three nodes, three routes
gpt-image-2, reverse gpt-2.0 all and reverse gpt-image-2-vip each cover one route. Pick by budget and needGPT-Image 2.5 twin models
gpt-image-2.5-flare / gpt-image-2.5-sunburst; -2026-09-08 dated snapshots are also listed for version pinningSix quality tiers
quality accepts auto / low / medium / high / xhigh / max; xhigh / max are accepted by the two 2.5 models onlyUp to 16 reference images
image_01 … image_16; the two reverse nodes take up to 14, for multi-image fusion and style transferMask inpainting
mask input on the official node targets the edit region precisely (transparent area is repainted, opaque area is kept)Real resolution + custom size
Prompt controllers
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 editsBuilt-in timeout & retry
408 / 429 / 5xx retry per retry_times, so peak-hour jitter is handledSupported APIYI Models
Using GPT-Image 2.5 in the node
Update the plugin, fully restart ComfyUI, then switch themodel (模型) 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.
- No silent downgrade: choosing
xhigh/maxon the oldgpt-image-2, or an invalid model / quality, makes the node raise an error before sending. It never swaps the tier for you - Use
autosparingly:autois 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-08in 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; setretry_timesto1if 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.
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.
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:
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 offersgemini-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_textis a single string for an image node’sprompt;edited_textsis a list output reserved for batch text workflows. After the pause, clickContinueon the node. Do not press the main Run button again, or ComfyUI re-queues and re-runs the upstream prompt enhancement
Installation
Step 1: Clone into custom_nodes
git pull in that folder to get 2.5 support.Step 2: Install dependencies
Step 3: Fully restart ComfyUI
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.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_keyfield - 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
Step 5: Import an example workflow
example_workflow.json: one example per image node (the official one usessize=2048x1152+quality=high+jpeg), with Chinese Note nodes explaining how to chooseexample_workflow_gpt_image_2_5.json: a standalone 2.5 example, Flare text-to-image → Sunburst edit → preview, defaulting to1K + 1:1,quality=high, a 600-second timeout andretry_times=1
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
Matchesexample_workflow_gpt_image_2_5.json in the repo:
Example 4: Reverse conversational image
Example 5: Prompt controller → pause and edit → generate
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
Which of the three image nodes should I pick?
Which of the three image nodes should I pick?
Comfyui-Luck gpt-image-2(official): realsize/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 togpt-image-2.5-flarefor text-to-image andgpt-image-2.5-sunburstfor editsComfyui-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 neededComfyui-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 sendsizetoday- Full comparison: official vs reverse
Will existing workflows switch to 2.5 after updating the plugin?
Will existing workflows switch to 2.5 after updating the plugin?
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.After switching to 2.5 with the same high, why is it cheaper and blurrier?
After switching to 2.5 with the same high, why is it cheaper and blurrier?
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.Does the plugin support gpt-image-2.5-all / gpt-image-2.5-vip?
Does the plugin support gpt-image-2.5-all / gpt-image-2.5-vip?
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.Node not found after installing?
Node not found after installing?
- Confirm the folder sits at
ComfyUI/custom_nodes/Comfyui-Luck-gpt2.0 pip install -r requirements.txtcompleted without errors- Fully restart ComfyUI (refreshing the frontend alone is not enough)
4K, xhigh / max or custom sizes time out a lot?
4K, xhigh / max or custom sizes time out a lot?
- The official node defaults to a 600-second read timeout; keep or raise it for 2.5
xhigh/maxand 2K / 4K. A408 Timeoutusually 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_timesto1to disable retries - If your server network is slow, see CDN image/video downloads are slow
- Switch
api_basetob.apiyi.com/v1if the default domain is flaky
Loading an old workflow reports Value 3 smaller than min of 30?
Loading an old workflow reports Value 3 smaller than min of 30?
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.After connecting the pause editor, gpt-image-2 reports Value not in list?
After connecting the pause editor, gpt-image-2 reports Value not in list?
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.b64_json from the reverse nodes comes back with a prefix?
b64_json from the reverse nodes comes back with a prefix?
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.Calls return 401 / 403?
Calls return 401 / 403?
- Check
api_keyvalidity and whether it is restricted by group - Make sure the selected model is whitelisted on the token
- Balance issues: see Balance seems enough but calls fail