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

prime-skills365,822+ installsVetted

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

Works with

claude appclaude codeclaude apicursorcodexwindsurfclinezed

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.

View source
License: MITBy prime-skills

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

Related assets

More curated picks in Marketing & Advertising.

All Image Outpainting alternatives →
skillclaude_appclaude_codeclaude_api
npx skills add genmedia-labs/skills
AI Image Generation
Generate and edit images on RunComfy via the `runcomfy` CLI — a smart router across the full image-model catalog: FLUX 2 (Klein 9B/4B, Pro, Dev, Flash…716,844+
skillclaude_appclaude_codeclaude_api
npx skills add flowkit-labs/skills
Reddit Automation
Find Reddit threads where people are genuinely asking for what you offer, then draft short, genuinely helpful replies — disclosing your affiliation ho…686,503+
skillclaude_appclaude_codeclaude_api
npx skills add heygen-com/hyperframes
Media Use
Agent Media OS, the single skill for every media need in a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT…590,510+
skillclaude_appclaude_codeclaude_api
npx skills add 101-skills/superpowers
AI Video Generation
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0, Hap…553,709+
skillclaude_appclaude_codeclaude_api
npx skills add 101-skills/superpowers
AI Image Generation
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FLUX.…553,287+
skillclaude_appclaude_codeclaude_api
npx skills add 101-skills/superpowers
AI Avatar Video
Create AI avatar and talking head videos via inference.sh CLI. Recommended: P-Video-Avatar (fastest, cheapest, built-in TTS). Also: OmniHuman, Fabric,…553,017+

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Marketing & Advertising