1实现原理 · 为什么它能做到
单端点专用文档(i2i 编辑):围绕 `google/nano-banana-2/edit`,核心参数是 image_urls 数组(1–20 张公开可抓取 URL,首图为主)、number_of_images(1–4 输出)、seed/aspect_ratio/resolution/output_format/safety_tolerance/limit_generations/enable_web_search。
| `image_urls` | array | yes | — | **1–20** publicly-fetchable HTTPS URLs. |
第一提示词原则 = preservation-first:先写『Keep [identity/pose/clothing/brand/framing] unchanged』再写改动,文档并解释机制原因(模型只认真前置的保留目标)。
**Preservation first, change last.** Always lead with `"Keep [identity / pose / clothing / brand / framing] unchanged."` Then state the change in one clean sentence. Models honor what's stated up front; tail-end preservations get ignored.
局部编辑靠空间语言实现:background only / the left object / upper-right corner 等具体空间域会被模型遵守,模糊的『make it more X』会漂移。
**Localize with spatial language.** "background only", "the left object", "the upper-right corner", "above the headline" — concrete spatial scopes are honored. "make it more X" is vague and drifts.
批量一致性纪律:系列编辑锁 aspect_ratio + resolution、用同一 prompt 语法,使批次输出像『sibling』而非 remix;复杂编辑拆小步迭代而非一次复合。
**Batch consistency** — when editing a series, lock `aspect_ratio` and `resolution`. Use the same prompt grammar across the batch so each output reads as a sibling, not a remix.
边界与导流:多语种图内文字编辑明确交给 GPT Image 2 edit;单参考精确局部编辑交给 Flux Kontext;从零生成交给 sibling nano-banana-2 t2i——本技能不自称万能。
| Edit multilingual text inside the image (signs, labels) | GPT Image 2 edit |
执行委托 runcomfy CLI + 云端推理:`runcomfy run google/nano-banana-2/edit --input '{...}' --output-dir`,CLI POST 到完整 API URL,轮询并下载结果。
The skill invokes `runcomfy run google/nano-banana-2/edit` with a JSON body matching the schema. The CLI POSTs to `https://model-api.runcomfy.net/v1/models/google/nano-banana-2/edit`, polls the request, fetches the result, and downloads any `.runcomfy.net`/`.runcomfy.com` URL into `--output-dir`.
2核心能力
3外部依赖
| 类型 | 依赖 |
|---|---|
| cli | runcomfy(@runcomfy/cli 官方 CLI) |
| package | @runcomfy/cli(npm 全局安装) |
| api | Google Nano Banana 2 图生图编辑端点(RunComfy Model API 托管) |
| network | 生成结果下载白名单 |
| network | 用户提供的 1–20 张输入图 URL——由 RunComfy 模型服务器抓取 |
| network | RunComfy 模型页 / 文档站(引用链接) |
4风险提醒 风险提醒:橙色 · 评估后使用
- 批量编辑 = 批量素材上云:最多 20 张图/次被 RunComfy 服务器抓取并参与推理 — 未发布 SKU、人脸、受版权素材的批量外发风险随 batch 放大;文档未提供本地处理选项。
- 外部图片 URL 是图像提示注入载体(文档自认 known risk) — 不可信来源图片可能以视觉指令操纵编辑输出;批量场景接触面成倍扩大。
- 执行面与供应链仓外(CLI、Model API、token 读取) — 文档对 CLI 行为的转述(0600、2 GiB、无 shell 展开)无法在本仓库证实。
- 与 image-edit Route 1 内容同源,触发边界模糊 — image-edit 的默认路由就是 nano-banana-edit;两技能并存且 trigger 词部分重叠,宿主可能同时装载造成冗余调用。
5第二遍独立确认
- [ok] 端点 ID 与完整 URL 一致(google/nano-banana-2/edit) — description、schema 标题、How-it-works 完整 URL 三处一致,无拼写漂移。
- [ok] 1–20 输入与 1–4 输出约束在 description/schema/Limitations 三处一致 — description(up to 20 inputs)、schema(1–20 / 1–4)、Limitations(1–20 input images / 1–4 outputs)数字自洽。
- [ok] 与 image-edit Route 1 的同源关系 — preservation-first 话术、cyberpunk 背景与 AURA 水印示例在 nano-banana-edit 与 image-edit 中逐字一致——确认为同源内容,非本文件独有。
- [ok] 多语种文字编辑让位 GPT Image 2 / 单参考让位 Flux Kontext 的导流 — When-to-pick 表与 Limitations 两处一致;对应品牌技能 gpt-image-edit/、flux-kontext/ 在仓库内真实存在。
- [unlocatable] SKILL.md 对 CLI 行为的断言(token 0600、2 GiB、无 shell 展开) — CLI 源码不在本仓库,仅文档自述,无法独立证实。
- [unlocatable] 『verified to produce strong results』sample prompts — 样例提示词自称 verified,仓内无评测证据可复核。
- [discrepancy] 身份/安装链接一致性 — SKILL.md 安装与 GitHub 链接指向 agentspace-so/runcomfy-skills,被 pin 镜像为 prime-skills/runcomfy-agent-skills——来源标识不一致(发布身份漂移)。
6结论
ba0f1dd15b2c6baf…fca19ae084