skill
Image Outpainting
Image 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, spatial-language driven), GPT Image 2 Edit (multi-ref with reference-style matching), FLUX Kontext Pro (single-shot maximum-preservation), and the brand edit endpoints (Seedream / Dreamina / Qwen / FLUX 2). Picks the ri...
About
# Image Outpainting
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.
[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)
## Powered by the RunComfy CLI
```bash # 1. Install (see runcomfy-cli skill for details) npm i -g @runcomfy/cli # or: npx -y @runcomfy/cli --version
# 2. Sign in runcomfy login # or in CI: export RUNCOMFY_TOKEN=<token>
# 3. Outpaint runcomfy run google/nano-banana-2/edit \ --input '{"prompt": "...extend canvas...", "image_urls": ["..."]}' \ --output-dir ./out ```
CLI deep dive: [`runcomfy-cli`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/runcomfy-cli) skill.
---
## Pick the right model
Listed by suitability for outpainting workflows.
**Nano Banana 2 Edit** — `google/nano-banana-2/edit` *(default for prompt-shaped outpaint)* > 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. > Pick for: aspect-ratio change (square → 16:9), uncrop a portrait, extend a landscape photo with matching environment. > Avoid for: pixel-precise extension matching texture seams — use a ComfyUI outpainting workflow.
**GPT Image 2 Edit** — `openai/gpt-image-2/edit` > Up to 10 reference images, layout-precise instruction following. Useful when outpainting needs to match a reference style or includes layout repositioning. > Pick for: composite outpaint (extend canvas + paste in element from another image), layout repositioning during the canvas change. > Avoid for: simple outpaint without external references.
**FLUX Kontext Pro** — `blackforestlabs/flux-1-kontext/pro/edit` > 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."` > Pick for: single-shot outpaint with maximum preservation of the original content.
**Seedream / Dreamina / Qwen / FLUX 2 edit endpoints** > 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.). > 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.
---
## Route 1: Nano Banana 2 Edit — default
**Model**: `google/nano-banana-2/edit` **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)
### Invoke
**Aspect-ratio change (1:1 → 16:9):**
```bash runcomfy run google/nano-banana-2/edit \ --input '{ "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.", "image_urls": ["https://your-cdn.example/portrait-1to1.jpg"], "aspect_ratio": "16:9" }' \ --output-dir ./out ```
**Uncrop a portrait (reveal more body):**
```bash runcomfy run google/nano-banana-2/edit \ --input '{ "prompt": "Extend the canvas downward to show the subject's full upper body and arms. Continue the existing clothing style, lighting, and background. Keep the face and current visible area exactly as in the input.", "image_urls": ["https://your-cdn.example/head-and-shoulders.jpg"] }' \ --output-dir ./out ```
### Prompting tips
- **Lead with the canvas change**: `"Extend the canvas to [aspect]"`, `"Extend downward"`, `"Extend on both sides by ~30%"`. - **Describe what extends**: continue background style, match lighting, match camera distance, match palette. - **End with preservation**: `"Keep [original visible area] exactly as in the input"`. Without this Nano Banana may regenerate the original portion subtly. - **Set `aspect_ratio` explicitly** to lock the output canvas — don't rely on the model to guess from prompt alone.
---
## Route 2: When prompt-shaped outpaint isn't enough
If the output has visible seams, mismatched lighting at the extension boundary, or content that doesn't continue cleanly, use one of:
1. *
Install
Run this command
npx skills add prime-skills/runcomfy-agent-skillsWorks with
Manual steps
Install with `npx skills add prime-skills/runcomfy-agent-skills`, or clone the repository and copy the `image-outpainting` folder into your Claude skills directory.
Frequently asked questions
What is the Image Outpainting skill?
Image 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, spatial-language driven), GPT Image 2 Edit (multi-ref with reference-style matching), FLUX Kontext Pro (single-shot maximum-preservation), an…
How do I install Image Outpainting?
Run this in your terminal:
npx skills add prime-skills/runcomfy-agent-skillsWhich AI tools does Image Outpainting work with?
It works with claude_app, claude_code, claude_api, cursor, codex, windsurf, cline, zed.
Who made Image Outpainting?
prime-skills, released under the MIT license.
Is Image Outpainting free?
Yes, it is free to use under the MIT license.
npx skills add genmedia-labs/skills
npx skills add flowkit-labs/skills
npx skills add heygen-com/hyperframes
npx skills add 101-skills/superpowers
npx skills add 101-skills/superpowers
npx skills add 101-skills/superpowers
Audit before you install
Run any source through our checks - AI visibility, security, performance, and stack detection.
Automated Web Security Scan
security
PageSpeed Analyzer
performance
AI Content Quality Test
arabic content
AI Agent / MCP Server Tester
ai testing
Site Stack Detector
migration
AI SEO / AEO / GEO Audit
ai visibility
llms.txt Generator
ai visibility
Readability Score
arabic content
Schema / JSON-LD Builder
ai visibility
AI Cost Calculator
ai testing
Headline Analyzer
arabic content