🖼️ Image Outpainting — Pro Pack on RunComfy — 🖼️ Image OutpAInting — Pro Pack on 运行Comfy
v0.1.0Image outpAInting on 运行Comfy via the `运行comfy` 命令行工具 — 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. 路由s 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 端点s (种子ream / Dreamina / Qwen / FLUX 2). Picks the right 路由 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 添加 canvas around an existing still.
运行时依赖
安装命令
点击复制技能文档
🖼️ Image OutpAInting — Pro Pack on 运行Comfy
Extend a still beyond its original canvas — uncrop, change aspect ratio, fill in what the camera didn't capture. This 技能 路由s across the 身份-preserving edit 端点s in the 运行Comfy cata记录, picking the right one for prose-driven 扩展, reference-style matching, or brand-locked continuation.
运行comfy.com · best-image-editing-模型s · 命令行工具 docs
Powered by the 运行Comfy 命令行工具 # 1. 安装 (see 运行comfy-命令行工具 技能 for detAIls) npm i -g @运行comfy/命令行工具 # or: npx -y @运行comfy/命令行工具 --version
# 2. 签名 in 运行comfy 记录in # or in CI: 导出 运行COMFY_令牌=<令牌>
# 3. OutpAInt 运行comfy 运行 google/nano-banana-2/edit \ --输入 '{"prompt": "...extend canvas...", "image_urls": ["..."]}' \ --输出-dir ./out
命令行工具 deep dive: 运行comfy-命令行工具 技能.
Pick the right 模型
列出ed by suitability for outpAInting 工作流s.
Nano Banana 2 Edit — google/nano-banana-2/edit (default for prompt-shaped outpAInt)
身份-preserving edit; honors spatial language ("extend the canvas to the left and right by ~30%", "添加 sky above the building"). The 结果 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 环境. Avoid for: pixel-precise 扩展 matching texture seams — use a ComfyUI outpAInting 工作流.
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. 添加 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.
种子ream / Dreamina / Qwen / FLUX 2 edit 端点s
Brand-specific edit 端点s (bytedance/种子ream-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 for the full edit 路由r.
路由 1: Nano Banana 2 Edit — default
模型: google/nano-banana-2/edit Cata记录: Nano Banana 2 Edit
Invoke
Aspect-ratio change (1:1 → 16:9):
运行comfy 运行 google/nano-banana-2/edit \ --输入 '{ "prompt": "Extend the canvas to a 16:9 aspect ratio by 添加ing matching 环境 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 输入.", "image_urls": ["https://your-cdn.example/portrAIt-1to1.jpg"], "aspect_ratio": "16:9" }' \ --输出-dir ./out
Uncrop a portrAIt (reveal more body):
运行comfy 运行 google/nano-banana-2/edit \ --输入 '{ "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 输入.", "image_urls": ["https://your-cdn.example/head-and-shoulders.jpg"] }' \ --输出-dir ./out
Prompting tips Lead with the canvas change: "Extend the canvas to [aspect]", "Extend downward", "Extend on 机器人h 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 输入". Without this Nano Banana may re生成 the original portion subtly. 设置 aspect_ratio explicitly to lock the 输出 canvas — don't rely on the 模型 to guess from prompt alone. 路由 2: When prompt-shaped outpAInt isn't enough
If the 输出 has visible seams, mismatched lighting at the 扩展 boundary, or content that doesn't continue 清理ly, use one of:
GPT Image 2 Edit with a reference image of the desired surrounding style (images: [original, style-ref]) FLUX Kontext Pro with maximum-preservation language A ComfyUI 工作流 — 运行Comfy hosts several outpAInting node graphs: comfyui-image-outpAInting-工作流 — classic SDXL outpAInting with seam handling flux-klein-unified-image-editing-inpAInt-移除-outpAInt-in-comfyui-advanced-image-restoration — Flux Klein unified inpAInt + outpAInt Browse: 运行comfy.com/comfyui-工作流s
These are 图形界面 工作流s, not 命令行工具 端点s. The 命令行工具 can't reach them — open them in the 运行Comfy ComfyUI cloud for finer control.
Common patterns Social media aspect-ratio swap (1:1 → 9:16 for Reels) 路由 1 (Nano Banana 2 Edit) with aspect_ratio: "9:16", prompt extends top + 机器人tom Banner / hero image fr