GPT Image 2 专业图编,多语精准可控
简介
基于 RunComfy 调用 GPT Image 2 /edit 端点,擅长多语言图文编辑、身份保持与精准布局调整,内置最佳提示词模式。
原始描述
Edit images with OpenAI GPT Image 2 (the `/edit` endpoint of ChatGPT Images 2.0) on RunComfy — bundled with the model's documented prompting patterns so the...
通过你的 Agent 添加
安装目录:gpt-image-edit/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
中文使用说明 来自收录源
核心用法
本 Skill 为纯文档型工具,通过本地 runcomfy CLI 将图像编辑请求转发至 RunComfy 托管的 OpenAI GPT Image 2 /edit 端点。核心调用方式为:
runcomfy run openai/gpt-image-2/edit \
--input '{"prompt": "...", "images": ["https://..."]}' \
--output-dir /path/to/output
支持多图参考(最多 10 张)、尺寸自动保留(size: auto)及三种固定比例。输入图像需提供公开可访问的 HTTPS URL。
提示词工程要点
必须前置保留指令:以 "Keep [face/pose/brand/layout] unchanged" 开头,再陈述修改目标。多语言文本编辑需直接引用目标字符并标注脚本类型,如 "reads \"コーヒー\" in bold Japanese kana"。空间操作使用具体方位词("top-right to bottom-center")。多图场景按编号引用("image 1", "image 2")。
显著优点
- 多语言内嵌文本编辑业界领先:支持拉丁、假名、CJK、西里尔、阿拉伯等任意脚本的原位替换,排版精度高
- 身份保持能力突出:人脸、姿态、品牌标识在定向编辑中稳定性强于同类模型
- 多图参考架构:最多 10 张参考图,适合复杂合成(主体来自图1、场景来自图2、光照来自图3)
- 布局精确控制:响应"移动标题从右上至底部居中"等空间指令
- 尺寸智能保留:
auto 模式自动维持输入宽高比,避免意外裁切
潜在缺点与局限性
局限
说明
批量一致性弱
单次最多处理 1 张主图,20 张以上 SKU 批量编辑建议用 Nano Banana Edit
复合指令漂移
长串多目标编辑("改A且改B且改C")易产生遗漏,建议拆分为多次调用
尺寸选项僵化
仅支持 auto、1024_1024、1024_1536、1536_1024 四种,自定义比例会 422 报错
人像真实感
极端 photorealism 场景下,Nano Banana Pro head-to-head 更优
外部 URL 依赖
输入图像须为公开 HTTPS URL,无法直接读取本地路径(需自行托管)
T3 来源
维护者为个人开发者 kalvinrv,非知名组织,长期维护存在不确定性
适合人群
- 跨境电商运营:需快速生成多语言版本广告图,保持品牌视觉一致性
- 设计师/创意工作者:需要精确替换海报文案、调整排版而不破坏整体构图
- 内容本地化团队:处理含内嵌文字的图片翻译与脚本转换
- AI 工作流搭建者:已将 RunComfy CLI 纳入自动化 pipeline 的技术用户
常规风险
- 凭据泄露风险:
RUNCOMFY_TOKEN 若写入日志或环境变量快照可能被捕获;建议配合密钥管理工具使用
- 图像 URL 投毒:输入的第三方图像 URL 可能被恶意替换为攻击载荷,建议仅使用可信 CDN
- 生成内容合规:GPT Image 2 可能产生版权敏感或不当内容,商业发布前需人工审核
- 服务可用性:依赖 RunComfy 第三方托管服务,存在单点故障与定价变动风险
- 版本漂移:当前认证针对 v0.1.4,后续版本未经审计,升级需重新评估
auto 模式自动维持输入宽高比,避免意外裁切| 局限 | 说明 |
|---|---|
| 批量一致性弱 | 单次最多处理 1 张主图,20 张以上 SKU 批量编辑建议用 Nano Banana Edit |
| 复合指令漂移 | 长串多目标编辑("改A且改B且改C")易产生遗漏,建议拆分为多次调用 |
| 尺寸选项僵化 | 仅支持 auto、1024_1024、1024_1536、1536_1024 四种,自定义比例会 422 报错 |
| 人像真实感 | 极端 photorealism 场景下,Nano Banana Pro head-to-head 更优 |
| 外部 URL 依赖 | 输入图像须为公开 HTTPS URL,无法直接读取本地路径(需自行托管) |
| T3 来源 | 维护者为个人开发者 kalvinrv,非知名组织,长期维护存在不确定性 |
适合人群
- 跨境电商运营:需快速生成多语言版本广告图,保持品牌视觉一致性
- 设计师/创意工作者:需要精确替换海报文案、调整排版而不破坏整体构图
- 内容本地化团队:处理含内嵌文字的图片翻译与脚本转换
- AI 工作流搭建者:已将 RunComfy CLI 纳入自动化 pipeline 的技术用户
常规风险
- 凭据泄露风险:
RUNCOMFY_TOKEN 若写入日志或环境变量快照可能被捕获;建议配合密钥管理工具使用
- 图像 URL 投毒:输入的第三方图像 URL 可能被恶意替换为攻击载荷,建议仅使用可信 CDN
- 生成内容合规:GPT Image 2 可能产生版权敏感或不当内容,商业发布前需人工审核
- 服务可用性:依赖 RunComfy 第三方托管服务,存在单点故障与定价变动风险
- 版本漂移:当前认证针对 v0.1.4,后续版本未经审计,升级需重新评估
- 凭据泄露风险:
RUNCOMFY_TOKEN若写入日志或环境变量快照可能被捕获;建议配合密钥管理工具使用 - 图像 URL 投毒:输入的第三方图像 URL 可能被恶意替换为攻击载荷,建议仅使用可信 CDN
- 生成内容合规:GPT Image 2 可能产生版权敏感或不当内容,商业发布前需人工审核
- 服务可用性:依赖 RunComfy 第三方托管服务,存在单点故障与定价变动风险
- 版本漂移:当前认证针对 v0.1.4,后续版本未经审计,升级需重新评估
技能正文
name: gpt-image-edit
displayName: "🫧 GPT Image Edit — Pro Pack on RunComfy"
description: >
Edit images with OpenAI GPT Image 2 (the /edit endpoint of ChatGPT
Images 2.0) on RunComfy — bundled with the model's documented
prompting patterns so the skill gets sharper output than naive
prompting against the same model. Documents GPT Image Edit's strengths
(preservation language, multilingual in-image text editing,
multi-reference up to 10 images, layout / typography precision),
the schema, and when to route to Nano Banana Edit / Flux Kontext /
GPT Image 2 t2i instead. Calls
runcomfy run openai/gpt-image-2/edit through the local RunComfy CLI.
Triggers on "gpt image edit", "gpt-image-edit", "chatgpt image edit",
"edit with gpt image 2", or any explicit ask to edit with this model.
emoji: "🫧"
homepage: https://www.runcomfy.com
license: MIT
clawdis:
requires:
bins:
- runcomfy
env:
- RUNCOMFY_TOKEN
config:
- ~/.config/runcomfy
🫧 GPT Image Edit — Pro Pack on RunComfy
runcomfy.com · docs · Edit endpoint · Text-to-image sibling
OpenAI GPT Image 2 — /edit endpoint (ChatGPT Images 2.0 image-to-image) on the RunComfy Model API. Strongest in its class at preserving identity through targeted edits and rewriting embedded text in any script (Latin, kana, CJK, Cyrillic, Arabic).
When to pick this model (vs siblings)
You want
Use
Edit multilingual / embedded text in image
GPT Image Edit ✓
Identity preservation through translated headline variants
GPT Image Edit ✓
Layout-precise edit (move headline, swap CTA, etc.)
GPT Image Edit ✓
Up to 10 reference images
GPT Image Edit ✓
Batch up to 20 images consistently
Nano Banana Edit
Single-shot precise local edit, source-fidelity-first
Flux Kontext
Generate from scratch with GPT Image 2
sibling gpt-image-2 skill
Batch SKU galleries with stable identity
Nano Banana Edit
Prerequisites
- RunComfy CLI —
npm i -g @runcomfy/cli
- RunComfy account —
runcomfy login opens a browser device-code flow.
- CI / containers — set
RUNCOMFY_TOKEN=<token> instead of runcomfy login.
Endpoints + input schema
openai/gpt-image-2/edit
Field
Type
Required
Default
Notes
prompt
string
yes
—
Edit instruction. Lead with preservation, end with the change.
images
string[]
yes
—
Up to 10 publicly-fetchable HTTPS URLs. First is primary; rest are auxiliary.
size
enum
no
auto
auto (preserve input), 1024_1024 (1:1), 1024_1536 (2:3 portrait), 1536_1024 (3:2 landscape).
| You want | Use |
|---|---|
| Edit multilingual / embedded text in image | GPT Image Edit ✓ |
| Identity preservation through translated headline variants | GPT Image Edit ✓ |
| Layout-precise edit (move headline, swap CTA, etc.) | GPT Image Edit ✓ |
| Up to 10 reference images | GPT Image Edit ✓ |
| Batch up to 20 images consistently | Nano Banana Edit |
| Single-shot precise local edit, source-fidelity-first | Flux Kontext |
| Generate from scratch with GPT Image 2 | sibling gpt-image-2 skill |
| Batch SKU galleries with stable identity | Nano Banana Edit |
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy account —
runcomfy loginopens a browser device-code flow. - CI / containers — set
RUNCOMFY_TOKEN=<token>instead ofruncomfy login.
Endpoints + input schema
openai/gpt-image-2/edit
openai/gpt-image-2/edit| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
prompt |
string | yes | — | Edit instruction. Lead with preservation, end with the change. |
images |
string[] | yes | — | Up to 10 publicly-fetchable HTTPS URLs. First is primary; rest are auxiliary. |
size |
enum | no | auto |
auto (preserve input), 1024_1024 (1:1), 1024_1536 (2:3 portrait), 1536_1024 (3:2 landscape). |
size=auto preserves the input ratio — strongly recommended unless the edit explicitly changes framing.
How to invoke
Single-ref preservation edit:
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "Keep the person'\''s face, pose, and brand mark unchanged. Replace the background with a soft warm-grey studio sweep and a gentle floor shadow.",
"images": ["https://.../portrait.jpg"]
}' \
--output-dir <absolute/path>
Multilingual text rewrite (preserve everything except the headline):
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "Keep the photograph, layout, and brand mark exactly as in the input. Replace only the in-image headline. The new headline reads \"今日のおすすめ\" in bold Japanese kana, same position and font weight as before.",
"images": ["https://.../poster-en.jpg"]
}' \
--output-dir <absolute/path>
Multi-ref composition:
runcomfy run openai/gpt-image-2/edit \
--input '{
"prompt": "Compose subject from image 1 into the room from image 2. Match the lighting and color palette of image 2. Keep image 1 subject identity (face, pose, clothing) unchanged.",
"images": ["https://.../subject.jpg", "https://.../room.jpg"]
}' \
--output-dir <absolute/path>
Prompting — what actually works
Lead with preservation goals. Always: "Keep [face / pose / clothing / brand / framing] unchanged." Then state the change. The model honors what's stated up front.
Multilingual text — quote the characters, name the script. "the headline reads \"コーヒー\" in bold Japanese kana", "the label says \"АРОМА\" in Cyrillic, white on black", "the right-margin caption reads \"تخفيض\" in Arabic right-to-left". Don't paraphrase — quote.
Directional language for spatial edits. Concrete spatial scopes work: "move the headline from top-right to bottom-center", "remove the leftmost object only", "replace the watermark in the bottom-right corner".
Multi-ref numbering. When passing multiple images, refer to them by number: "subject from image 1, lighting from image 2, color palette from image 3". The model routes cues correctly.
Use size: "auto" to preserve input ratio. Only override when the edit explicitly changes framing (e.g. cropping a 16:9 to 1:1).
Anti-patterns:
- Long compound edit instructions ("change A and B and C and D") → drift increases per added scope.
- Missing preservation goals → model subtly rewrites the face / brand / framing.
- Paraphrasing in-image text instead of quoting it → text comes out different.
- Asking for
sizeoutside the 3 fixed values +auto→ 422.
Where it shines
Use case
Why GPT Image Edit
Multilingual ad localization
One source asset → many language variants of the same headline
Brand-safe headline / CTA swaps
Layout precision + preservation language hold the rest stable
Multi-ref composition (subject from one, scene from another)
Numbered refs route cues correctly
Layout-precise repositioning
Directional language ("top-right to bottom-center") honored
Identity preservation across signage edits
Strongest in class for face / brand preservation through targeted edits
Sample prompts (verified to produce strong results)
| Use case | Why GPT Image Edit |
|---|---|
| Multilingual ad localization | One source asset → many language variants of the same headline |
| Brand-safe headline / CTA swaps | Layout precision + preservation language hold the rest stable |
| Multi-ref composition (subject from one, scene from another) | Numbered refs route cues correctly |
| Layout-precise repositioning | Directional language ("top-right to bottom-center") honored |
| Identity preservation across signage edits | Strongest in class for face / brand preservation through targeted edits |
Background swap with full preservation (page example):
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
Multilingual variant:
Keep the photograph, layout, lighting, and brand mark exactly as in the
input. Replace only the in-image headline.
The new headline reads "コーヒー" in bold Japanese kana, same position
and font weight as before.
Multi-ref composition:
Compose subject from image 1 into the kitchen from image 2.
Match the warm window light and color palette of image 2.
Keep subject identity (face, pose, clothing) from image 1 unchanged.
Limitations
size: 3 fixed values + auto — anything else 422s.
images: up to 10 — first is primary, rest are auxiliary cues.
- Long compound prompts drift — split into multiple passes when needed.
- For batch consistency across many SKU images, Nano Banana Edit (up to 20) is better.
- Photorealism on portraits — Nano Banana Pro wins head-to-head.
Exit codes
code
meaning
0
success
64
bad CLI args
65
bad input JSON / schema mismatch
69
upstream 5xx
75
retryable: timeout / 429
77
not signed in or token rejected
size: 3 fixed values + auto — anything else 422s.images: up to 10 — first is primary, rest are auxiliary cues.| code | meaning |
|---|---|
| 0 | success |
| 64 | bad CLI args |
| 65 | bad input JSON / schema mismatch |
| 69 | upstream 5xx |
| 75 | retryable: timeout / 429 |
| 77 | not signed in or token rejected |
Full reference: docs.runcomfy.com/cli/troubleshooting.
How it works
The skill invokes runcomfy run openai/gpt-image-2/edit with a JSON body matching the schema. The CLI POSTs to https://model-api.runcomfy.net/v1/models/openai/gpt-image-2/edit, polls the request, fetches the result, and downloads any .runcomfy.net/.runcomfy.com URL into --output-dir. Ctrl-C cancels the remote request before exit.
Security & Privacy
- Token storage:
runcomfy login writes the API token to ~/.config/runcomfy/token.json with mode 0600 (owner-only read/write). Set RUNCOMFY_TOKEN env var to bypass the file entirely in CI / containers.
- Input boundary: the user prompt is passed as a JSON string to the CLI via
--input. 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.
- 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
model-api.runcomfy.net (request submission) and *.runcomfy.net / *.runcomfy.com (download whitelist for generated outputs). No telemetry, no callbacks.
- Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.
runcomfy login writes the API token to ~/.config/runcomfy/token.json with mode 0600 (owner-only read/write). Set RUNCOMFY_TOKEN env var to bypass the file entirely in CI / containers.--input. 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.model-api.runcomfy.net (request submission) and *.runcomfy.net / *.runcomfy.com (download whitelist for generated outputs). No telemetry, no callbacks.正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。