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…
SaferSkills independently audited image-outpainting (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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 · best-image-editing-models · CLI docs
# 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 ./outCLI deep dive: runcomfy-cli skill.
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. Seeimage-editfor the full edit router.
Model: google/nano-banana-2/edit Catalog: Nano Banana 2 Edit
Aspect-ratio change (1:1 → 16:9):
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 ./outUncrop a portrait (reveal more body):
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"Extend the canvas to [aspect]", "Extend downward", "Extend on both sides by ~30%"."Keep [original visible area] exactly as in the input". Without this Nano Banana may regenerate the original portion subtly.If the output has visible seams, mismatched lighting at the extension boundary, or content that doesn't continue cleanly, use one of:
images: [original, style-ref])comfyui-image-outpainting-workflow — classic SDXL outpainting with seam handlingflux-klein-unified-image-editing-inpaint-remove-outpaint-in-comfyui-advanced-image-restoration — Flux Klein unified inpaint + outpaintThese are GUI workflows, not CLI endpoints. The CLI can't reach them — open them in the RunComfy ComfyUI cloud for finer control.
aspect_ratio: "9:16", prompt extends top + bottomaspect_ratio: "21:9" or "16:9", prompt extends sides with matching environmentimage-inpainting.video-outpainting.best-image-editing-models collectionnano-banana · flux-kontext · seedream collections — edit endpoints that all accept outpaint-shaped prompts| 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 |
Full reference: docs.runcomfy.com/cli/troubleshooting.
The skill classifies user intent — simple aspect-ratio swap, reference-style match, or brand-locked continuation — picks the matching edit endpoint, and invokes runcomfy run with the outpaint-shaped JSON body. The CLI POSTs to the Model API, polls request status, and downloads the result into --output-dir.
npm i -g @runcomfy/cli or npx -y @runcomfy/cli. Agents must not pipe an arbitrary remote install script into a shell on the user's behalf.runcomfy login writes the API token to ~/.config/runcomfy/token.json with mode 0600. Set RUNCOMFY_TOKEN env var in CI / containers.--input. The CLI does not shell-expand prompt content. No shell-injection surface.model-api.runcomfy.net and *.runcomfy.net / *.runcomfy.com. No telemetry.Bash(runcomfy *) only.runcomfy-cli — the underlying CLIimage-edit — full image-edit router (the edit endpoints used here)image-inpainting — mask-driven internal region edits (opposite of outpaint)ai-image-generation — text-to-image / image-to-image routervideo-outpainting — extending the canvas of a video~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.