$npx -y skills add prime-skills/runcomfy-agent-skills --skill image-outpaintingImage outpainting on RunComfy via the runcomfy CLI — extend a still beyond its original canvas, fill in what the camera didn't capture, change aspect ratio (square → 16:9, portrait → landscape) while preserving the original content. Routes across Nano Banana 2 Edit (default, sp
| 1 | # Image Outpainting |
| 2 | |
| 3 | Extend a still beyond its original canvas — uncrop, change aspect ratio, fill in what the camera didn't capture. This skill routes across the identity-preserving edit endpoints in the RunComfy catalog, picking the right one for prose-driven extension, reference-style matching, or brand-locked continuation. |
| 4 | |
| 5 | [runcomfy.com](https://www.runcomfy.com/?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting) · [best-image-editing-models](https://www.runcomfy.com/models/collections/best-image-editing-models?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting) · [CLI docs](https://docs.runcomfy.com/cli/introduction?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting) |
| 6 | |
| 7 | ## Powered by the RunComfy CLI |
| 8 | |
| 9 | ```bash |
| 10 | # 1. Install (see runcomfy-cli skill for details) |
| 11 | npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --version |
| 12 | |
| 13 | # 2. Sign in |
| 14 | runcomfy login # or in CI: export RUNCOMFY_TOKEN=<token> |
| 15 | |
| 16 | # 3. Outpaint |
| 17 | runcomfy run google/nano-banana-2/edit \ |
| 18 | --input '{"prompt": "...extend canvas...", "image_urls": ["..."]}' \ |
| 19 | --output-dir ./out |
| 20 | ``` |
| 21 | |
| 22 | CLI deep dive: [`runcomfy-cli`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/runcomfy-cli) skill. |
| 23 | |
| 24 | --- |
| 25 | |
| 26 | ## Pick the right model |
| 27 | |
| 28 | Listed by suitability for outpainting workflows. |
| 29 | |
| 30 | **Nano Banana 2 Edit** — `google/nano-banana-2/edit` *(default for prompt-shaped outpaint)* |
| 31 | > Identity-preserving edit; honors spatial language ("extend the canvas to the left and right by ~30%", "add sky above the building"). The result is a wider canvas with the original content preserved. |
| 32 | > Pick for: aspect-ratio change (square → 16:9), uncrop a portrait, extend a landscape photo with matching environment. |
| 33 | > Avoid for: pixel-precise extension matching texture seams — use a ComfyUI outpainting workflow. |
| 34 | |
| 35 | **GPT Image 2 Edit** — `openai/gpt-image-2/edit` |
| 36 | > Up to 10 reference images, layout-precise instruction following. Useful when outpainting needs to match a reference style or includes layout repositioning. |
| 37 | > Pick for: composite outpaint (extend canvas + paste in element from another image), layout repositioning during the canvas change. |
| 38 | > Avoid for: simple outpaint without external references. |
| 39 | |
| 40 | **FLUX Kontext Pro** — `blackforestlabs/flux-1-kontext/pro/edit` |
| 41 | > Single-instruction, high-preservation edit. Use form: `"Extend the canvas to a 16:9 aspect ratio. Add matching sky and architecture continuing from the existing scene. Keep everything in the original image exactly."` |
| 42 | > Pick for: single-shot outpaint with maximum preservation of the original content. |
| 43 | |
| 44 | **Seedream / Dreamina / Qwen / FLUX 2 edit endpoints** |
| 45 | > Brand-specific edit endpoints (`bytedance/seedream-5/lite/edit`, `bytedance/dreamina-4-0/edit`, `qwen/qwen-image/qwen-image-edit-2511`, `blackforestlabs/flux-2-pro/edit`, etc.). |
| 46 | > Pick for: keeping the outpaint within the same brand/style as the source generation. See [`image-edit`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/image-edit) for the full edit router. |
| 47 | |
| 48 | --- |
| 49 | |
| 50 | ## Route 1: Nano Banana 2 Edit — default |
| 51 | |
| 52 | **Model**: `google/nano-banana-2/edit` |
| 53 | **Catalog**: [Nano Banana 2 Edit](https://www.runcomfy.com/models/google/nano-banana-2/edit?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting) |
| 54 | |
| 55 | ### Invoke |
| 56 | |
| 57 | **Aspect-ratio change (1:1 → 16:9):** |
| 58 | |
| 59 | ```bash |
| 60 | runcomfy run google/nano-banana-2/edit \ |
| 61 | --input '{ |
| 62 | "prompt": "Extend the canvas to a 16:9 aspect ratio by adding matching environment on the left and right sides of the image. Continue the existing background style — same lighting, same camera distance, same color palette. Keep the original subject, pose, framing, and central content exactly as in the input.", |
| 63 | "image_urls": ["https://your-cdn.example/portrait-1to1.jpg"], |
| 64 | "aspect_ratio": "16:9" |
| 65 | }' \ |
| 66 | --output-dir ./out |
| 67 | ``` |
| 68 | |
| 69 | **Uncrop a portrait (reveal more body):** |
| 70 | |
| 71 | ```bash |
| 72 | runcomfy run google/nano-banana-2/edit \ |
| 73 | --input '{ |
| 74 | "prompt": "Extend the |