$npx -y skills add prime-skills/runcomfy-agent-skills --skill nano-banana-editEdit 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 G
| 1 | # Nano Banana Edit — Pro Pack on RunComfy |
| 2 | |
| 3 | [runcomfy.com](https://www.runcomfy.com/?utm_source=skills.sh&utm_medium=skill&utm_campaign=nano-banana-edit) · [Edit endpoint](https://www.runcomfy.com/models/google/nano-banana-2/edit?utm_source=skills.sh&utm_medium=skill&utm_campaign=nano-banana-edit) · [GitHub](https://github.com/agentspace-so/runcomfy-skills/tree/main/nano-banana-edit) |
| 4 | |
| 5 | 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. |
| 6 | |
| 7 | ```bash |
| 8 | npx skills add agentspace-so/runcomfy-skills --skill nano-banana-edit -g |
| 9 | ``` |
| 10 | |
| 11 | ## When to pick this model (vs siblings) |
| 12 | |
| 13 | | You want | Use | |
| 14 | |---|---| |
| 15 | | Preserve subject identity, swap background or clothing | **Nano Banana Edit** | |
| 16 | | Edit up to 20 images consistently in one batch | **Nano Banana Edit** | |
| 17 | | Localize edit to "X only" with spatial language | **Nano Banana Edit** | |
| 18 | | Edit multilingual text inside the image (signs, labels) | GPT Image 2 edit | |
| 19 | | Single ref + precise local edit ("she's now holding X") | Flux Kontext | |
| 20 | | Generate a new image from scratch | Nano Banana 2 t2i (sibling skill) | |
| 21 | |
| 22 | If the user said "nano banana edit" / "edit with nano banana" explicitly, route here regardless. |
| 23 | |
| 24 | ## Prerequisites |
| 25 | |
| 26 | 1. **RunComfy CLI** — `npm i -g @runcomfy/cli` |
| 27 | 2. **RunComfy account** — `runcomfy login` opens a browser device-code flow. |
| 28 | 3. **CI / containers** — set `RUNCOMFY_TOKEN=<token>` instead of `runcomfy login`. |
| 29 | |
| 30 | ## Endpoints + input schema |
| 31 | |
| 32 | ### `google/nano-banana-2/edit` |
| 33 | |
| 34 | | Field | Type | Required | Default | Notes | |
| 35 | |---|---|---|---|---| |
| 36 | | `prompt` | string | yes | — | Edit instruction. Lead with preservation, end with the change. | |
| 37 | | `image_urls` | array | yes | — | **1–20** publicly-fetchable HTTPS URLs. | |
| 38 | | `number_of_images` | int | no | 1 | 1–4 outputs per call. | |
| 39 | | `seed` | int | no | — | Reproducibility. | |
| 40 | | `aspect_ratio` | enum | no | `auto` | `auto` (follows input) or fixed ratios — lock for batch consistency. | |
| 41 | | `resolution` | enum | no | `1K` | `0.5K` / `1K` / `2K` / `4K`. | |
| 42 | | `output_format` | enum | no | `png` | `png` / `jpeg` / `webp`. | |
| 43 | | `safety_tolerance` | int | no | 4 | 1 (strict) – 6 (permissive). | |
| 44 | | `limit_generations` | bool | no | — | If true, restricts each round to one output. | |
| 45 | | `enable_web_search` | bool | no | false | Web grounding (extra cost / latency). | |
| 46 | |
| 47 | ## How to invoke |
| 48 | |
| 49 | **Single-image background swap, identity preserved:** |
| 50 | |
| 51 | ```bash |
| 52 | runcomfy run google/nano-banana-2/edit \ |
| 53 | --input '{ |
| 54 | "prompt": "Keep the subject identity, pose, and clothing unchanged. Convert the background into a rainy neon cyberpunk street.", |
| 55 | "image_urls": ["https://.../portrait.jpg"] |
| 56 | }' \ |
| 57 | --output-dir <absolute/path> |
| 58 | ``` |
| 59 | |
| 60 | **Batch edit with locked framing:** |
| 61 | |
| 62 | ```bash |
| 63 | runcomfy run google/nano-banana-2/edit \ |
| 64 | --input '{ |
| 65 | "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.", |
| 66 | "image_urls": ["https://.../sku-1.jpg", "https://.../sku-2.jpg", "https://.../sku-3.jpg"], |
| 67 | "aspect_ratio": "1:1", |
| 68 | "resolution": "1K" |
| 69 | }' \ |
| 70 | --output-dir <absolute/path> |
| 71 | ``` |
| 72 | |
| 73 | **Targeted spatial edit ("left object only"):** |
| 74 | |
| 75 | ```bash |
| 76 | runcomfy run google/nano-banana-2/edit \ |
| 77 | --input '{ |
| 78 | "prompt": "Remove the leftmost object only. Keep the right two objects, the table, and the lighting unchanged.", |
| 79 | "image_urls": ["https://.../still-life.jpg"] |
| 80 | }' \ |
| 81 | --output-dir <absolute/path> |
| 82 | ``` |
| 83 | |
| 84 | ## Prompting — what actually works |
| 85 | |
| 86 | **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. |
| 87 | |
| 88 | **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. |
| 89 | |
| 90 | **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. |
| 91 | |
| 92 | **Iterate small.** If a one-pass edit drifts, split into |