Overview
Comfyui-Luck-gpt2.0 is a ComfyUI custom node pack contributed by community user luckdvr. It lets you call APIYI’s two GPT image models directly inside ComfyUI — official gpt-image-2 and reverse-engineered gpt-image-2-all. The two nodes divide work clearly: the former focuses on fine-grained parameters (resolution, quality, mask, multi-reference), while the latter delivers the ChatGPT-parity conversational image experience, with built-in timeout/retry — ideal for production workflows.
Project Info
- 🔗 Source:
github.com/luckdvr/Comfyui-Luck-gpt2.0 - 📜 License: Apache-2.0
- 👤 Author: luckdvr
- ⭐ Community contribution, built for APIYI
Core Features
Two nodes, two routes
Comfyui-Luck gpt-image-2 (official) and Comfyui-Luck gpt-2.0 all (reverse) — pick whichever fits the sceneUp to 5 reference images
The official node accepts up to 5 reference images for complex fusion and style transfer
Mask inpainting
Optional mask input to precisely target the edit region for local changes
Multi-tier + custom resolution
1K / 2K / 4K presets plus custom sizing (max 3840px per edge, 655,360–8,294,400 total pixels)
15 aspect ratios
AUTO, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, 1:4, 4:1, 1:8, 8:1
Quality & output format
quality (auto / low / medium / high) + output format (png / jpeg / webp) + compression 0-100Dual endpoints (reverse node)
gpt-image-2-all supports switching between chat_completions and images_api endpointsBuilt-in timeout & retry
Timeout and retry parameters built in — stable even at peak hours
Supported APIYI Models
For a full side-by-side, see the gpt-image-2 (official) vs gpt-image-2-all (reverse) comparison.
Node Parameters
Comfyui-Luck gpt-image-2 (official)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
api_key | string | Yes | - | APIYI token — we recommend a dedicated key with a usage cap |
prompt | string | Yes | - | Generation or editing instruction |
image_1 … image_5 | IMAGE | No | - | Reference images, up to 5 |
mask | MASK | No | - | Optional mask for inpainting (white area = edit region) |
size | enum | No | 2K | Output resolution (1K / 2K / 4K / custom) |
custom_size | string | No | - | Used when size is custom, e.g. 2048x3072 |
aspect_ratio | enum | No | AUTO | One of 15 aspect ratios |
quality | enum | No | auto | auto / low / medium / high |
output_format | enum | No | png | png / jpeg / webp |
output_compression | int | No | 80 | 0-100 (applies to jpeg / webp only) |
Comfyui-Luck gpt-2.0 all (reverse)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
api_key | string | Yes | - | APIYI token |
prompt | string | Yes | - | Conversational image prompt |
endpoint | enum | No | chat_completions | chat_completions / images_api |
response_format | enum | No | - | b64_json / url etc. |
timeout_seconds | int | No | - | Per-request timeout |
retry_times | int | No | - | Retry count on failure |
Installation
Step 3: Restart ComfyUI
Search
Luck gpt-image-2 or Luck gpt-2.0 all in the node palette to find them.Step 4: Configure APIYI key
- Visit APIYI Console → Tokens, create a new key (use a usage cap for safety)
- Paste it into the
api_keyfield - The node defaults to
api.apiyi.com; you can switch to backup domainsvip.apiyi.com/b.apiyi.comif needed
Usage Examples
Example 1: Official 4K high-quality text-to-image
Example 2: Mask inpainting (official)
Example 3: Reverse conversational image
FAQ
Which node should I pick?
Which node should I pick?
gpt-image-2(official): controllable parameters, native mask support, per-token billing, fine-grained resolution/quality — best when you have specific size requirements or need local editsgpt-image-2-all(reverse): per-call billing ($0.03/call), conversational natural-language prompts, parity with the ChatGPT web experience — best for iterative edits and strong text rendering- Full side-by-side: official vs reverse comparison
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 or custom sizes time out a lot?
4K or custom sizes time out a lot?
- Raise
timeout_secondson the reverse node - If your server network is slow, see CDN image/video downloads are slow
- Switch to backup domains
vip.apiyi.com/b.apiyi.comif the default endpoint is flaky
b64_json comes back with a prefix?
b64_json comes back with a prefix?
The reverse
gpt-image-2-all returns b64_json with a data:image/png;base64, prefix, while the official gpt-image-2 does not. Details in the official vs reverse comparison.Calls return 401 / 403?
Calls return 401 / 403?
- Check
api_keyvalidity and whether it’s restricted by channel - Make sure the selected model is whitelisted on the token
- Balance issues — see Balance seems enough but calls fail
Related Resources
gpt-image-2 (official) docs
Native 2K/4K generation, per-token billing
gpt-image-2-all (reverse) docs
ChatGPT parity, $0.03 per call
Official vs Reverse comparison
17-dimension side-by-side table
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 for the same two GPT image models
APIYI Console
Manage keys, usage, and channels