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 right route based on whether the outpaint is prose-driven, reference-driven, or brand-locked. Triggers on "outpaint", "outpainting", "extend image canvas", "expand the image", "fill in around the photo", "uncrop", "change aspect ratio", "extend frame", "wide-screen from square", or any explicit ask to add canvas around an existing still.
What this skill does
# 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. **GPT Image 2 Edit** with a reference image of the desired surrounding style (`images: [original, style-ref]`)
2. **FLUX Kontext Pro** with maximum-preservation language
3. **A ComfyUI workflow** — RunComfy hosts several outpainting node graphs:
- `comfyui-image-outpainting-workflow` — classic SDXL outpainting with seam handling
- `flux-klein-unified-image-editing-inpaint-remove-outpaint-in-comfyui-advanced-image-restoration` — Flux Klein unified inpaint + outpaint
- Browse: [runcomfy.com/comfyui-workflows](https://www.runcomfy.com/comfyui-workflows?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting)
These are GUI workflows, not CLI endpoints. The CLI can't reach them — open them in the RunComfy ComfyUI cloud for finer control.
---
## Common patterns
### Social media aspect-ratio swap (1:1 → 9:16 for Reels)
- **Route 1 (Nano Banana 2 Edit)** with `aspect_ratio: "9:16"`, prompt extends top + bottom
### Banner / hero image from a portrait
- **Route 1** with `aspect_ratio: "21:9"` or `"16:9"`, prompt extends sides with matching environment
### Uncrop product shot for catalog
- **Route 1** describing what surrounds the product (counter texture, lighting, shadow direction)
### Restore a cropped historical photo
- **Route 2 (GPT Image 2 Edit)** with one or more period-appropriate reference photos
### Multi-step outpaint (extend, then re-extend)
- Chain: outpaint pass 1 → use result as input for pass 2. Each pass extends ~30–50% to avoid quality degradation at the boundary.
### What this skill doesn't do
- **Mask-driven local edits** (fill a hole inside the existing canvas): see [`image-inpainting`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/image-inpainting).
- **Video outpainting** (extend video canvas spatially): see [`video-outpainting`](https://www.skills.sh/agentspace-so/runcomfy-agent-skills/video-outpainting).
---
## Browse the full catalog
- [`best-image-editing-models` collection](https://www.runcomfy.com/models/collections/best-image-editing-models?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting)
- [`nano-banana`](https://www.runcomfy.com/models/collections/nano-banana?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting) · [`flux-kontext`](https://www.runcomfy.com/models/collections/flux-kontext?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting) · [`seedream`](https://www.runcomfy.com/models/collections/seedream?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting) collections — edit endpoints that all accept outpaint-shaped prompts
- [ComfyUI workflows](https://www.runcomfy.com/comfyui-workflows?utm_source=skills.sh&utm_medium=skill&utm_campaign=image-outpainting) — search "outpaint" for dedicated outpainting workflow node graphs
---
## Exit codes
| code | meaning |
|---|---|
| 0 | success |
| 64 | bad CLI args |
| 65 | bad input JSON / schema mismatch |
| 69 | upstream 5xx |
| 75 | retryable: timeout / 429 |
| 77Related in Ads & Marketing
ads
IncludedMulti-platform paid advertising audit and optimization skill. Analyzes Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, and Apple Ads. 250+ checks with scoring, parallel agents, industry templates, and AI creative generation.
banana
IncludedAI image generation Creative Director powered by Google Gemini Nano Banana models. Use this skill for ANY request involving image creation, editing, visual asset production, or creative direction. Triggers on: generate an image, create a photo, edit this picture, design a logo, make a banner, visual for my anything, and all /banana commands. Handles text-to-image, image editing, multi-turn creative sessions, batch workflows, and brand presets.
rpg-migration-analyzer
IncludedAnalyzes legacy RPG (Report Program Generator) programs from AS/400 and IBM i systems for migration to modern Java applications. Extracts business logic from RPG III/IV/ILE source code, identifies data structures (D-specs), file operations (F-specs), program dependencies (CALLB/CALLP), and converts RPG constructs to Java equivalents. Generates migration reports, complexity estimates, and Java implementation strategies with POJO classes, JPA entities, and service methods. Use when modernizing AS/400 or IBM i legacy systems, analyzing RPG source files (.rpg, .rpgle, .RPGLE), converting RPG to Java, mapping data specifications to Java classes, planning legacy system migration, or when user mentions RPG analysis, Report Program Generator, RPG III/IV/ILE, AS/400 modernization, IBM i migration, packed decimal conversion, or mainframe application rewrite.
brand-library-architect
IncludedBuild a complete brand library for a product — visual asset render pipeline, brand documentation set (BRAND, COPY, MANIFESTO, BIOS, FAQ, GLOSSARY, TONE, PRICING), open-source convention files (README, CONTRIBUTING, SECURITY, CODE_OF_CONDUCT), and a self-contained press kit. This skill should be used when the user asks to "build a brand library / brand kit / press kit / brand assets" for a product, "set up a brand library workflow," "create a positioning manifesto plus visual identity," or any combination of brand documentation + visual asset pipeline. Apply phase-by-phase or run end-to-end. Templates are product-agnostic and use {{TOKEN}} placeholders the skill prompts the user to fill.
writing-tech-post
IncludedAuthors engineering blog posts end-to-end: launch deep-dives, incident postmortems, architecture migrations, performance case studies, tutorials, AI/agent system writeups, security disclosures, and research-to-product translations. Picks the correct archetype, plans the abstraction ladder, enforces an evidence cadence (diagrams, benchmarks, profiles, traces, code, ablations), tunes voice against publisher house styles (Datadog, Vercel, GitHub, AWS, Meta, Cloudflare, Jane Street), and runs a pre-publish gate for narrative momentum and disclosure ethics. Use when drafting a new engineering post, restructuring a draft that feels flat, deciding which evidence form belongs where, validating that depth and product context are balanced, or preparing a postmortem, migration, or performance narrative for external publication. Do not use for API reference documentation, README authoring, marketing copy, release notes, generic SEO content, ghost-written executive thought leadership, or non-engineering long-form essays.
blog-google
IncludedGoogle API integration for blog performance: PageSpeed Insights, CrUX Core Web Vitals with 25-week history, Search Console performance, URL Inspection, Indexing API, GA4 organic traffic, NLP entity analysis for E-E-A-T, YouTube video search for embedding, and Google Ads Keyword Planner. Progressive feature availability based on credential tier (API key, OAuth/service account, GA4, Ads). Shares config with claude-seo at ~/.config/claude-seo/google-api.json. Use when user says "google data", "page speed", "core web vitals", "search console", "indexation", "GA4", "keyword research", "nlp entities", "blog performance", "youtube search", "google api setup".