Loading...
Loading...
Edit images on RunComfy — this skill is a smart router that matches the user's intent to the right edit model in the RunComfy catalog. Picks Nano Banana Edit (batch up to 20, identity-preserving default), OpenAI GPT Image 2 Edit (multilingual in-image text rewrite, multi-ref composition, layout precision), Flux Kontext Pro (single-ref high-fidelity local edit), or Z-Image Turbo Inpaint (mask-driven precise region edit). Bundles each model's documented prompting patterns so the skill gets sharper edits without burning iterations on the wrong model. Calls `runcomfy run <vendor>/<model>/edit` through the local RunComfy CLI. Triggers on "image edit", "edit image", "image-to-image", "i2i", "swap background", "remove object", "rewrite headline", or any explicit ask to edit a single or batch of images.
npx skill4agent add agentspace-so/runcomfy-agent-skills image-editnpx skills add agentspace-so/runcomfy-skills --skill image-edit -g| User intent | Model | Why |
|---|---|---|
| Batch edit 1–20 images consistently (SKU gallery, A/B variants) | Nano Banana Edit | Up to 20 input images per call; locked aspect/resolution for series |
| Swap background, preserve subject identity | Nano Banana Edit | Strong identity preservation under "keep X unchanged" prompts |
| Localized object removal / addition with spatial language ("the left object", "upper-right corner") | Nano Banana Edit | Honors directional spatial scope |
| Multilingual / non-Latin in-image text rewrite (Japanese kana, Cyrillic, Arabic) | GPT Image 2 Edit | Strongest in class for multilingual typography |
| Multi-reference composition (subject from img1, scene from img2, palette from img3) | GPT Image 2 Edit | Numbered refs route cues correctly |
| Layout-precise repositioning ("move headline from top-right to bottom-center") | GPT Image 2 Edit | Directional language honored at layout level |
| Identity preservation across translated headline variants | GPT Image 2 Edit | Same source asset → many language variants, identity stable |
| Single-shot precise local edit ("she's now holding an orange umbrella") | Flux Kontext Pro | Single-ref single-instruction, high-fidelity preservation |
| Mask-driven object removal (cables, watermarks, distractions) | Z-Image Turbo Inpaint | Mask-required, strength-tunable, edge-consistent |
| Mask-driven region replacement (full background swap with mask) | Z-Image Turbo Inpaint | High strength + clean mask = clean replacement |
| Default if unspecified | Nano Banana Edit | Most flexible, supports both single and batch |
npm i -g @runcomfy/cliruncomfy loginRUNCOMFY_TOKEN=<token>google/nano-banana-2/edit| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | Lead with preservation goals, end with the change. |
| array | yes | — | 1–20 publicly-fetchable HTTPS URLs. |
| int | no | 1 | 1–4 outputs per call. |
| enum | no | | |
| enum | no | | |
| enum | no | | |
| int | no | — | Reproducibility. |
| bool | no | false | Web-grounded edits (extra latency). |
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>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>"Keep [identity / pose / brand / framing] unchanged."aspect_ratioresolutionopenai/gpt-image-2/edit| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| string | yes | — | Edit instruction; lead with preservation. |
| string[] | yes | — | Up to 10 HTTPS URLs. First is primary; rest are auxiliary. |
| enum | no | | |
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.",
"images": ["https://.../poster-en.jpg"]
}' \
--output-dir <absolute/path>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 unchanged.",
"images": ["https://.../subject.jpg", "https://.../room.jpg"]
}' \
--output-dir <absolute/path>"Japanese kana""Cyrillic""Arabic right-to-left""subject from image 1, lighting from image 2""move the headline from top-right to bottom-center""replace the watermark in the bottom-right"size: "auto"blackforestlabs/flux-1-kontext/pro/edit| Field | Type | Required | Notes |
|---|---|---|---|
| string | yes | One declarative edit instruction. |
| string | yes | Single source image URL. |
| enum | no | Pick from supported W:H values. |
| int | no | Reproducibility. |
runcomfy run blackforestlabs/flux-1-kontext/pro/edit \
--input '{
"prompt": "Keep the person'\''s face, pose, and clothing unchanged. Add an orange umbrella in her left hand and a slight smile.",
"image": "https://.../portrait.jpg"
}' \
--output-dir <absolute/path>"Keep [unchanged elements]"tongyi-mai/z-image/turbo/inpainting| Field | Type | Required | Notes |
|---|---|---|---|
| string | yes | What to fill / replace; preservation constraints for the unmasked surround. |
| string | yes | Source image URL. |
| string | yes | Grayscale mask URL (white = inpaint, black = preserve). |
| float | no | 0.3–0.6 retouching, 0.7–1.0 full replacement. |
| float | no | 0.6–0.9 typical. |
| enum | no | W:H output ratio. |
| int | no | Reproducibility. |
runcomfy run tongyi-mai/z-image/turbo/inpainting \
--input '{
"prompt": "Remove overhead cables; preserve rooflines and sky gradient; thin clean sky.",
"image": "https://.../street.jpg",
"mask_image": "https://.../cables-mask.png",
"strength": 0.5,
"control_scale": 0.8
}' \
--output-dir <absolute/path>runcomfy run tongyi-mai/z-image/turbo/inpainting \
--input '{
"prompt": "Replace busy backdrop with smooth light gray studio paper; mask background only.",
"image": "https://.../product.jpg",
"mask_image": "https://.../bg-mask.png",
"strength": 0.9
}' \
--output-dir <absolute/path>0.3–0.50.6–0.70.8–1.0"preserve rooflines and sky gradient""match brick pattern and mortar tone""the left shelf""upper-right quadrant"gpt-image-editflux-kontextnano-banana-edit| 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 |
runcomfy run <model_id>.runcomfy.net.runcomfy.com--output-dirCtrl-Cruncomfy login~/.config/runcomfy/token.jsonRUNCOMFY_TOKEN--inputmodel-api.runcomfy.net*.runcomfy.net*.runcomfy.com