Nano Banana Edit — Pro Pack on RunComfy

作者 prime-skillsfca19ae084c2MIT收录于 2026年10月8日更新于 2026年10月8日

Edit images with Google Nano Banana 2 (image-to-image edit endpoint) on RunComfy. Documents Nano Banana Edit's strengths (preserve subject identity, swap background, localize edits with spatial language, multi-image batch edits up to 20 inputs), the schema, and when to route to GPT Image 2 edit / Flux Kontext / Nano Banana 2 t2i instead. Calls `runcomfy run google/nano-banana-2/edit` through the local RunComfy CLI. Triggers on "nano banana edit", "edit with nano banana", "image edit nano banana", or any explicit ask to edit with this model.

仅含说明Design & Creative
AI 生成的概览

指导通过 RunComfy CLI 使用 Google Nano Banana 2 进行图生图编辑。

功能
该技能说明如何通过 RunComfy CLI 调用 google/nano-banana-2/edit 端点,涵盖输入结构(prompt、image_urls、宽高比、分辨率、输出格式、seed 等)以及调用示例。它讲解提示词实践,例如先声明需要保留的内容、用空间语言限定编辑范围,以及在批量处理时锁定构图以保持一致。它还列出何时改用同类模型,以及限制、退出码和安全说明。
适用场景
适用于使用 Nano Banana 2 编辑现有图片的场景,尤其是保留主体身份、替换背景、进行局部空间编辑,或对最多 20 张输入图片做一致的批量编辑。也适用于用户明确要求用 Nano Banana 进行编辑的情况。
运行要求
需要全局安装的 RunComfy CLI(通过 npm 安装)以及通过 runcomfy login 登录的 RunComfy 账号,或在 CI 与容器中使用 RUNCOMFY_TOKEN 环境变量。需要访问 RunComfy 模型 API 的网络连接,输入图片必须是可公开获取的 HTTPS URL。该技能不附带脚本,仅提供说明。

Nano Banana Edit — Pro Pack on RunComfy

runcomfy.com · Edit endpoint · GitHub

Google Nano Banana 2 Edit — the image-to-image edit endpoint of the Gemini-family flash-tier image model — hosted on the RunComfy Model API. Up to 20 input images per call for batch edits and multi-reference variation.

bash
npx skills add agentspace-so/runcomfy-skills --skill nano-banana-edit -g

When to pick this model (vs siblings)

You wantUse
Preserve subject identity, swap background or clothingNano Banana Edit
Edit up to 20 images consistently in one batchNano Banana Edit
Localize edit to "X only" with spatial languageNano Banana Edit
Edit multilingual text inside the image (signs, labels)GPT Image 2 edit
Single ref + precise local edit ("she's now holding X")Flux Kontext
Generate a new image from scratchNano Banana 2 t2i (sibling skill)

If the user said "nano banana edit" / "edit with nano banana" explicitly, route here regardless.

Prerequisites

  1. RunComfy CLI — npm i -g @runcomfy/cli
  2. RunComfy account — runcomfy login opens a browser device-code flow.
  3. CI / containers — set RUNCOMFY_TOKEN=<token> instead of runcomfy login.

Endpoints + input schema

google/nano-banana-2/edit

FieldTypeRequiredDefaultNotes
promptstringyes—Edit instruction. Lead with preservation, end with the change.
image_urlsarrayyes—1–20 publicly-fetchable HTTPS URLs.
number_of_imagesintno11–4 outputs per call.
seedintno—Reproducibility.
aspect_ratioenumnoautoauto (follows input) or fixed ratios — lock for batch consistency.
resolutionenumno1K0.5K / 1K / 2K / 4K.
output_formatenumnopngpng / jpeg / webp.
safety_toleranceintno41 (strict) – 6 (permissive).
limit_generationsboolno—If true, restricts each round to one output.
enable_web_searchboolnofalseWeb grounding (extra cost / latency).

How to invoke

Single-image background swap, identity preserved:

bash
runcomfy run google/nano-banana-2/edit \  --input '{    "prompt": "Keep the subject identity, pose, and clothing unchanged. Convert the background into a rainy neon cyberpunk street.",    "image_urls": ["https://.../portrait.jpg"]  }' \  --output-dir <absolute/path>

Batch edit with locked framing:

bash
runcomfy run google/nano-banana-2/edit \  --input '{    "prompt": "Replace the watermark in the bottom-right with the text \"AURA\" in clean white sans-serif. Keep everything else exactly as in the input.",    "image_urls": ["https://.../sku-1.jpg", "https://.../sku-2.jpg", "https://.../sku-3.jpg"],    "aspect_ratio": "1:1",    "resolution": "1K"  }' \  --output-dir <absolute/path>

Targeted spatial edit ("left object only"):

bash
runcomfy run google/nano-banana-2/edit \  --input '{    "prompt": "Remove the leftmost object only. Keep the right two objects, the table, and the lighting unchanged.",    "image_urls": ["https://.../still-life.jpg"]  }' \  --output-dir <absolute/path>

Prompting — what actually works

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.

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.

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.

Iterate small. If a one-pass edit drifts, split into two: pass 1 changes background only, pass 2 swaps the subject's outfit. Cleaner edits, same total cost (assuming similar resolution).

Multi-image variation — pass up to 20 inputs to get a coherent batch. Useful for SKU galleries, A/B testing, character sheet variations.

Anti-patterns:

  • Long compound instructions ("change A and B and C and D") — drift increases per added scope.
  • Edit instructions written in passive voice ("the background should be changed") — be imperative.
  • Missing preservation goals — model will subtly rewrite the face / brand.
  • Aspect ratios that don't match input — causes crops or stretches.

Where it shines

Use caseWhy Nano Banana Edit
SKU gallery — same product on different backgroundsBatch of 20, identity-preserved, framing locked
Influencer / spokesperson background swapsStrong identity preservation across edits
Localized object removal / additionSpatial language honored
A/B variants for ad creativeSeed lock + multiple number_of_images
Brand-asset relocalizationSame composition with text / palette swap

Sample prompts (verified to produce strong results)

Background swap (page example):

Keep the subject identity unchanged. Convert the background into a rainyneon cyberpunk street.

Targeted text replacement:

Keep the bottle, label, and lighting exactly as in the input.Replace only the brand text on the label from "ALPHA" to "AURA",same font weight, centered, white on black.

Multi-image batch consistency:

For each input image: keep the subject's pose and identity unchanged.Convert the background to a soft warm-grey studio sweep with subtlefloor shadow. Center the subject at the same fraction of frame as theinput.

Limitations

  • 1–20 input images per call — the first is treated as primary; the rest provide auxiliary cues.
  • 1–4 outputs per call.
  • Long compound prompts drift — split into multiple passes.
  • Web search adds latency + cost — only enable on demand.
  • For multilingual in-image text edits, GPT Image 2 edit wins.

Exit codes

codemeaning
0success
64bad CLI args
65bad input JSON / schema mismatch
69upstream 5xx
75retryable: timeout / 429
77not signed in or token rejected

Full reference: docs.runcomfy.com/cli/troubleshooting.

How it works

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. 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.

来源与署名

来源:prime-skills/runcomfy-agent-skills位于nano-banana-edit提交fca19ae

许可证: MIT

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

举报或申请下架

更多来自 prime-skills/runcomfy-agent-skills 的技能

Wan 2.7 — Pro Pack on RunComfy

prime-skills

Generate text-to-video with Wan 2.7 (Wan-AI's flagship motion model) on RunComfy. Documents Wan 2.7's strengths (multi-reference conditioning, audio-driven lip-sync via `audio_url`, smoother transitions, prompt expansion), the duration / resolution / aspect-ratio schema, and when to route to HappyHorse 1.0 / Seedance 2.0 / Kling / LTX 2 instead. Calls `runcomfy run wan-ai/wan-2-7/text-to-video` through the local RunComfy CLI. Triggers on "wan", "wan 2.7", "wan-2-7", "wan video", or any explicit ask to generate video with this model.

待分类2026年10月8日

Video Edit — Pro Pack on RunComfy

prime-skills

将视频编辑请求路由到三个 RunComfy 视频模型之一,并通过 RunComfy CLI 调用。

Design & Creative2026年10月8日

Seedance 2.0 Pro — Pro Pack on RunComfy

prime-skills

指导通过 RunComfy CLI 使用字节跳动 Seedance 2.0 Pro 生成电影感短视频。

Design & Creative2026年10月8日

Nano Banana 2 — Pro Pack on RunComfy

prime-skills

Generate images with Google Nano Banana 2 (Gemini-family flash-tier text-to-image) on RunComfy — bundled with the model's documented prompting patterns so the skill gets sharper output than naive prompting against the same model. Documents Nano Banana 2's strengths (rapid iteration, in-image typography rendering, predictable framing, optional web-grounded context), the resolution-tier pricing, the safety-tolerance dial, and when to route to Nano Banana Pro / GPT Image 2 / Flux 2 / Seedream instead. Calls `runcomfy run google/nano-banana-2/text-to-image` through the local RunComfy CLI. Triggers on "nano banana", "nano-banana-2", "nano banana 2", "google image gen", "gemini image", or any explicit ask to generate with this model.

待分类2026年10月8日

Image-to-Video — Pro Pack on RunComfy

prime-skills

将图生视频请求路由到合适的 RunComfy 模型,并通过 RunComfy CLI 调用。

Design & Creative2026年10月8日

Kling 3.0 - Pro Pack on RunComfy

prime-skills

指导通过 RunComfy CLI 端点生成 Kling 3.0 视频,涵盖三个档位与两种模式。

Design & Creative2026年10月8日