gpt-image-2
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGPT Image 2 — Pro Pack on RunComfy
GPT Image 2 — RunComfy专业套件
OpenAI GPT Image 2 (ChatGPT Images 2.0) hosted on the RunComfy Model API — no OpenAI key, async REST.
bash
npx skills add agentspace-so/runcomfy-skills --skill gpt-image-2 -g由RunComfy Model API托管的OpenAI GPT Image 2(ChatGPT Images 2.0)——无需OpenAI密钥,支持异步REST调用。
bash
npx skills add agentspace-so/runcomfy-skills --skill gpt-image-2 -gWhen to pick this model (vs siblings)
何时选择该模型(vs同类模型)
GPT Image 2's distinct strength is directive precision: it follows multi-element prompts, layout cues, and embedded-text instructions more reliably than its peers. Pick it when what's on the canvas matters more than how stylized it looks.
| You want | Use |
|---|---|
| Embedded text, logos, signage, multilingual typography | GPT Image 2 |
| Brand-safe, e-commerce / ad / UI mockup imagery | GPT Image 2 |
| Iterative refinement that holds composition stable | GPT Image 2 |
| Heavy stylization, painterly look | Flux 2 |
| Hyperrealistic portrait | Nano Banana Pro |
| Cinematic / aesthetic-first hero shots | Seedream 5 |
If the user explicitly asked for GPT Image 2 / ChatGPT Image 2 / Image 2, route here regardless — don't second-guess the model choice.
GPT Image 2的核心优势是指令精准度:相比同类模型,它能更可靠地遵循多元素提示词、布局指引和嵌入文本指令。当画布内容比风格化效果更重要时,选择该模型。
| 需求场景 | 适用模型 |
|---|---|
| 嵌入文本、标识、标牌、多语言排版 | GPT Image 2 |
| 品牌合规的电商/广告/UI原型图 | GPT Image 2 |
| 保持构图稳定的迭代优化 | GPT Image 2 |
| 重度风格化、绘画质感 | Flux 2 |
| 超写实人像 | Nano Banana Pro |
| 电影质感/美学优先的主视觉图 | Seedream 5 |
如果用户明确要求使用GPT Image 2 / ChatGPT Image 2 / Image 2,无论何种场景都直接使用该模型——无需质疑模型选择。
Prerequisites
前置要求
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy account — opens a browser device-code flow.
runcomfy login - CI / containers — set instead of
RUNCOMFY_TOKEN=<token>.runcomfy login
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy账户 — 执行会打开浏览器设备码登录流程。
runcomfy login - CI/容器环境 — 设置环境变量替代
RUNCOMFY_TOKEN=<token>。runcomfy login
Endpoints + input schema
端点与输入Schema
Two endpoints, same model.
两个端点共用同一模型。
openai/gpt-image-2/text-to-image
openai/gpt-image-2/text-to-imageopenai/gpt-image-2/text-to-image
openai/gpt-image-2/text-to-image| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | The positive prompt |
| enum | no | | |
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| string | 是 | — | 正向提示词 |
| enum | 否 | | 可选值为 |
openai/gpt-image-2/edit
openai/gpt-image-2/editopenai/gpt-image-2/edit
openai/gpt-image-2/edit| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | Natural-language edit instruction |
| string[] | yes | — | Up to 10 reference image URLs (publicly fetchable HTTPS) |
| enum | no | | |
size=auto| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| string | 是 | — | 自然语言格式的编辑指令 |
| string[] | 是 | — | 最多10张可公开访问的参考图片HTTPS链接 |
| enum | 否 | | |
编辑时使用可保留输入图片的宽高比——除非编辑明确要求改变画幅,否则强烈推荐使用该选项。
size=autoHow to invoke
调用方法
Text-to-image:
bash
runcomfy run openai/gpt-image-2/text-to-image \
--input '{"prompt": "<user prompt>", "size": "1024_1536"}' \
--output-dir <absolute/path>Edit (single ref):
bash
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "<edit instruction>",
"images": ["https://..."]
}' \
--output-dir <absolute/path>Edit (multi-ref, up to 10):
bash
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "compose subject from image 1 into the room from image 2; match the lighting of image 2",
"images": ["https://...subject.jpg", "https://...room.jpg"]
}' \
--output-dir <absolute/path>The CLI submits, polls every 2s until terminal, then downloads any / URL from the result into . Stdout is the result JSON. Stderr is progress.
*.runcomfy.net*.runcomfy.com--output-dirFor pipe-friendly usage:
bash
runcomfy --output json run openai/gpt-image-2/text-to-image \
--input '{"prompt":"..."}' --no-wait | jq -r .request_id文本生成图像:
bash
runcomfy run openai/gpt-image-2/text-to-image \
--input '{"prompt": "<用户提示词>", "size": "1024_1536"}' \
--output-dir <绝对路径>单参考图编辑:
bash
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "<编辑指令>",
"images": ["https://..."]
}' \
--output-dir <绝对路径>多参考图编辑(最多10张):
bash
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "将图1中的主体合成到图2的房间中;匹配图2的光线",
"images": ["https://...subject.jpg", "https://...room.jpg"]
}' \
--output-dir <绝对路径>CLI提交请求后,每2秒轮询一次直到任务完成,随后将结果中所有 / 链接的文件下载到目录。标准输出为结果JSON,标准错误输出为进度信息。
*.runcomfy.net*.runcomfy.com--output-dir管道友好型用法:
bash
runcomfy --output json run openai/gpt-image-2/text-to-image \
--input '{"prompt":"..."}' --no-wait | jq -r .request_idPrompting — what actually works
提示词技巧——有效方法
These are model-specific patterns that empirically improve output quality. Apply to text-to-image and edit alike.
Be explicit on subject + setting + mood. "A close-up of a matte ceramic water bottle on warm linen, soft window light, neutral background" — three concrete directives — beats "nice product photo of a bottle".
Quote embedded text exactly. Keep it short. GPT Image 2 is the strongest text-rendering model in this class, but only when you put the literal characters in quotes. Long blocks of text degrade. For multilingual text, name the script: "Japanese kana", "Cyrillic", "Arabic right-to-left".
Use compositional cues directly. "rule of thirds", "close-up", "aerial view", "centered subject", "shallow depth of field" — these have learned-meaning to the model.
Iterate one attribute at a time. When refining, change one thing per iteration (lighting OR background OR pose OR text) and keep the rest of the prompt verbatim. The model holds composition stable across iterations when only one knob moves.
Don't conflict instructions. "no text" + "the word 'AQUA+' on the label" is incoherent — the model will pick one and you don't control which.
Don't pile up styles. "ukiyo-e + watercolor + 8K + cinematic + minimalist" cancels out. Pick one or two style anchors max.
For the edit endpoint specifically:
- State preservation goals. "keep the person's pose and face identity unchanged", "keep the brand mark and typography on the package", "keep the overall framing". The model needs to know what NOT to change.
- Use directional language for spatial edits. "Move the headline from top-right to bottom-center", not "reposition the headline".
- Multi-ref: number the images in the prompt — "subject from image 1, lighting and background from image 2" — and the model will route the cues correctly.
以下是经实践验证的模型专属提示词模式,可提升输出质量,适用于文本生成图像和编辑场景。
明确主体+场景+氛围。例如“暖亚麻布上哑光陶瓷水瓶的特写,柔和窗光,中性背景”——三个具体指令——远优于“好看的水瓶产品图”。
精确引用嵌入文本,保持简短。GPT Image 2是同类模型中文本渲染能力最强的,但仅当你将文字内容放在引号中时效果最佳。长文本会降低输出质量。对于多语言文本,需注明文字体系:“日文假名”、“西里尔字母”、“阿拉伯文从右到左”。
直接使用构图指引词。“三分法”、“特写”、“鸟瞰视角”、“主体居中”、“浅景深”——这些词汇对模型有明确的语义。
每次迭代仅修改一个属性。优化时,每次只修改一个元素(光线/背景/姿态/文本),其余提示词保持不变。当仅调整一个变量时,模型会在迭代过程中保持构图稳定。
避免指令冲突。“无文本” + “标签上显示'AQUA+'字样”的指令自相矛盾——模型会自行选择其中一项,无法控制结果。
不要堆砌风格词。“浮世绘+水彩+8K+电影质感+极简主义”会相互抵消效果。最多选择1-2个风格锚点。
针对编辑端点的专属技巧:
- 明确内容保留目标。例如“保留人物的姿态和面部特征不变”、“保留包装上的品牌标识和排版”、“保留整体画幅”。模型需要知道哪些内容不能修改。
- 使用方向性语言描述空间编辑。例如“将标题从右上角移至底部中央”,而非“重新定位标题”。
- 多参考图:在提示词中为图片编号——“图1的主体,图2的光线和背景”——模型会正确识别各参考图的作用。
Where it shines
适用场景
| Use case | Why GPT Image 2 |
|---|---|
| E-commerce product photography | Reliable text on labels, brand-safe lighting, consistent across SKUs |
| High-conversion ads | Headline + visual integration in one pass |
| Brand asset localization | One source asset → many language variants of the same headline |
| Signage, posters, packaging mock-ups | Text rendering accuracy at multiple scales |
| UI mockups, scientific illustrations | Layout precision and label legibility |
| 使用场景 | 选择GPT Image 2的原因 |
|---|---|
| 电商产品摄影 | 标签文本渲染可靠,品牌合规光线,SKU间风格一致 |
| 高转化率广告 | 标题与视觉元素可一次性整合生成 |
| 品牌资产本地化 | 单源资产可生成多语言版本的标题 |
| 标牌、海报、包装原型 | 多尺度下文本渲染精准 |
| UI原型、科学插图 | 布局精准,标签清晰可读 |
Sample prompts (verified to produce strong results)
验证有效的示例提示词
Text-to-image — product hero:
A minimal hero product still life: a matte ceramic water bottle on warm linen,
soft window light, the word "AQUA+" in clean sans-serif on the label,
subtle rim highlights, e-commerce ready, 8K detail, neutral backgroundText-to-image — multilingual signage:
A small Tokyo café storefront at dusk, warm interior glow,
the sign reads "コーヒー" in bold Japanese kana on a wooden plaque,
shallow depth of field, rule of thirds, cinematicEdit — background swap with preservation:
Turn the background into a bright minimal white-to-soft-gray studio sweep
with gentle floor shadow; add a large headline in-image that reads
"OPEN STUDIO" in a bold clean sans-serif, high contrast, centered;
keep the main person or product, pose, and face identity unchanged文本生成图像——产品主图:
极简风格产品静物主图:暖亚麻布上的哑光陶瓷水瓶,
柔和窗光,标签上印有简洁无衬线字体的"AQUA+",
微妙的边缘高光,符合电商需求,8K细节,中性背景文本生成图像——多语言标牌:
黄昏时分的东京小咖啡馆店面,温暖的室内灯光,
木质招牌上用粗体日文假名写着"コーヒー",
浅景深,三分法构图,电影质感编辑——背景替换并保留内容:
将背景替换为明亮的极简白到浅灰渐变工作室场景,
添加高对比度、居中的大号内嵌标题"OPEN STUDIO",字体为粗体简洁无衬线;
保留主体人物/产品、姿态和面部特征不变Limitations
局限性
- Only 3 fixed sizes on text-to-image (and the same 3 + on edit). Extreme aspect ratios are auto-resized to the nearest supported one.
auto - Prompt length ~ a few thousand tokens. Long blocks of embedded text degrade output.
- Edit's multi-image support is "guidance from up to 10 refs", not ControlNet-style stacks. The first image is treated as the primary; the rest provide auxiliary cues.
- Photorealism on portraits is not its strongest suit — Nano Banana Pro wins that head-to-head.
- 文本生成图像仅支持3种固定尺寸(编辑场景支持这3种尺寸+)。极端宽高比会自动调整为最接近的支持尺寸。
auto - 提示词长度约为几千token。长文本块会降低输出质量。
- 编辑的多图支持是“最多10张参考图的指引”,而非ControlNet式的图层叠加。第一张图被视为主要参考,其余提供辅助线索。
- 人像超写实能力并非其强项——Nano Banana Pro在该场景表现更优。
Exit codes
退出码
The CLI uses sysexits-style codes:
runcomfy| code | meaning |
|---|---|
| 0 | success |
| 64 | bad CLI args |
| 65 | bad input JSON / schema mismatch (e.g. |
| 69 | upstream 5xx |
| 75 | retryable: timeout / 429 |
| 77 | not signed in or token rejected |
Full reference: docs.runcomfy.com/cli/troubleshooting.
runcomfy| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 64 | CLI参数错误 |
| 65 | 输入JSON错误/schema不匹配(例如 |
| 69 | 上游服务5xx错误 |
| 75 | 可重试:超时/429限流 |
| 77 | 未登录或令牌被拒绝 |
How it works
工作原理
- The skill invokes with a JSON body matching the schema above.
runcomfy run openai/gpt-image-2/<endpoint> - The CLI POSTs to with the user's bearer token.
https://model-api.runcomfy.net/v1/models/openai/gpt-image-2/<endpoint> - The Model API returns a ; the CLI polls
request_idevery 2 seconds.GET .../requests/<id>/status - On terminal status, the CLI fetches and downloads any URL whose host ends with
GET .../requests/<id>/resultor.runcomfy.netinto.runcomfy.com. Other URLs are listed but not fetched.--output-dir - while polling sends
Ctrl-Cso you don't get billed for GPU you stopped.POST .../requests/<id>/cancel
- 本技能调用,传入符合上述schema的JSON请求体。
runcomfy run openai/gpt-image-2/<endpoint> - CLI将请求POST到,并携带用户的Bearer令牌。
https://model-api.runcomfy.net/v1/models/openai/gpt-image-2/<endpoint> - Model API返回;CLI每2秒轮询一次
request_id。GET .../requests/<id>/status - 任务完成后,CLI获取,并将所有主机后缀为
GET .../requests/<id>/result或.runcomfy.net的链接文件下载到.runcomfy.com。其他链接仅列出不下载。--output-dir - 轮询时按会发送
Ctrl-C请求,避免为已停止的GPU使用付费。POST .../requests/<id>/cancel
What this skill is not
本技能不具备的功能
Not a direct OpenAI API client. Not a capability grant — depends on a working RunComfy account. Not multi-tenant.
并非直接的OpenAI API客户端。不提供独立能力——依赖可用的RunComfy账户。不支持多租户。
Security & Privacy
安全与隐私
- Token storage: writes the API token to
runcomfy loginwith mode 0600 (owner-only read/write). Set~/.config/runcomfy/token.jsonenv var to bypass the file entirely in CI / containers.RUNCOMFY_TOKEN - Input boundary: the user prompt is passed as a JSON string to the CLI via . The CLI does NOT shell-expand the prompt; it transmits the JSON body directly to the Model API over HTTPS. No shell injection surface from prompt content.
--input - Third-party content: image / mask / video URLs you pass are fetched by the RunComfy model server, not by the CLI on your machine. Treat external URLs as untrusted; image-based prompt injection is a known risk for any image-edit / video-edit model.
- Outbound endpoints: only (request submission) and
model-api.runcomfy.net/*.runcomfy.net(download whitelist for generated outputs). No telemetry, no callbacks.*.runcomfy.com - Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.
- 令牌存储:会将API令牌写入
runcomfy login,权限为0600(仅所有者可读写)。在CI/容器环境中,可设置~/.config/runcomfy/token.json环境变量绕过文件存储。RUNCOMFY_TOKEN - 输入边界:用户提示词通过以JSON字符串形式传递给CLI。CLI不会对提示词进行shell扩展,而是直接通过HTTPS将JSON请求体传输给Model API。提示词内容不存在shell注入风险。
--input - 第三方内容:你传入的图片/遮罩/视频链接由RunComfy模型服务器获取,而非本地CLI。请将外部链接视为不可信;基于图片的提示词注入是所有图像编辑/视频编辑模型的已知风险。
- 出站端点:仅访问(请求提交)和
model-api.runcomfy.net/*.runcomfy.net(生成结果下载白名单)。无遥测,无回调。*.runcomfy.com - 生成文件大小限制:CLI会终止任何超过2 GiB的单个文件下载,防止恶意或异常模型输出占满磁盘。