Capability notes
Outpainting — extending an image beyond its original borders while maintaining visual coherence — is a specialized image generation task less mature than [inpainting](/tasks/inpainting). No model is architected specifically for outpainting; instead, inpainting models are repurposed: create an expanded canvas with the original image centered, treat the new border region as a "mask" to fill. This approach works adequately for simple extensions (sky, grass, wallpaper) but breaks on structured content (architecture, text, faces).
Flux Fill (Black Forest Labs) is the best open-weight outpainting engine in 2026. When provided an expanded canvas (e.g. 1024×1024 original padded to 1536×1024 with black borders), Flux Fill treats the border region as a mask and generates content consistent with the known center. Quality varies by extension type: sky extension (add more sky above): 90%+ seamless — uniform texture, easy to extrapolate. Landscape extension (add more forest/city to sides): 65–80% seamless — repetitive patterns (trees, buildings) look plausible but lack the original image's compositional structure. Architectural extension (add another floor to a building): 30–50% plausible — structural patterns like windows and columns extend but proportions degrade after 25% expansion. Face/image extension (complete a half-cropped face): 15–30% — anatomical accuracy drops sharply as the model must infer symmetric facial features from partial information.
SDXL Outpainting uses the same mask strategy with SDXL inpainting checkpoints. Quality is 15–25% below Flux Fill — more visible seams, less coherent structure continuation. The LoRA ecosystem partially compensates: style-specific LoRAs (architectural, natural landscape, anime) improve coherence within their domain by 5–15%. For recommended models, see [Llama 3.3 70B](/models/llama-3-3-70b). Deploy locally with [Ollama](/tools/ollama) on [RTX 4090](/hardware/rtx-4090).
If you just want to try this
Lowest-friction path to a working setup.
Use [ComfyUI](/tools/comfyui) with Flux Fill for outpainting. Install ComfyUI via Stability Matrix.
Workflow for extending an image:
1. Install Flux Fill model via ComfyUI Manager → Install Models → "flux1-fill-dev".
2. Load base workflow: ComfyUI's built-in outpainting template under "Workflows → Image → Outpainting."
3. Load your image in a Load Image node.
4. Use the "Pad Image for Outpainting" node — set target dimensions (e.g. 1024×1024 → 1536×1024 by adding 256px per side), padding mode = "reflect" (mirrors edges for initial fill).
5. The padded region becomes the mask. Connect to Flux Fill's mask input.
6. Prompt: describe what should fill the border — "sky with clouds," "brick wall," "forest continuation." Keep prompt focused on the new content only.
7. Steps=20–30, guidance=3.5, Queue Prompt.
On [RTX 4060 Ti 16GB](/hardware/rtx-4060-ti-16gb): 8–15 seconds per outpainting at 1536×1024. [RTX 4090](/hardware/rtx-4090): 3–6 seconds. For seamless results, outpainting in 256 px increments yields better coherence than one large 512 px expansion — 4× 256 px expansions produces more natural results than 1× 1024 px expansion, at 4× generation time.
Use [ControlNet](/tools/diffusers) for structural outpainting (architecture, interiors). Download ControlNet Canny model via ComfyUI Manager. Pipeline: Load Image → Canny Edge → Pad Edge Map → Flux Fill conditioned on extended edge map. This forces windows, columns, and structural lines to continue correctly. Setup takes 5 extra nodes but dramatically improves architectural outpainting.
For SDXL outpainting (lower VRAM), use SD WebUI Forge. Install Forge, load SDXL Inpainting model, img2img → Inpaint → check "Outpaint" mode → set expansion pixels → generate. Simpler setup but lower quality. Acceptable for landscape/sky extension; avoid for faces or structured content.
For production deployment
Operator-grade recommendation.
Production outpainting requires careful quality management — outpainting is inherently harder than [inpainting](/tasks/inpainting) because the model has less context (one-sided or two-sided border vs fully-surrounded mask).
**Incremental expansion strategy.** Rather than expanding 1024×1024 → 1536×1536 in one pass (512 px expansion on each side), expand in 128–256 px increments. Each increment lets the model use the previously-generated content as stable context for the next expansion. Four 128 px expansions produce higher quality and fewer artifacts than one 512 px expansion, at 1.5–2× generation time. Automate sequential expansion in a loop: expand top → expand bottom → expand left → expand right, each at 128–256 px.
**ControlNet routing by content type.** Classify image content before outpainting: detect edges (Canny) — if image has strong structural lines (buildings, roads, interiors), use Canny ControlNet. Detect depth (MiDaS/Depth Anything) — if image has depth variation (landscapes, rooms), use Depth ControlNet. If image is texture-dominant (sky, water, grass), use no ControlNet — pure Flux Fill excels on texture extrapolation. Classification adds 200–500ms per image; routing improves outpainting quality 15–25% for structured content with no quality penalty for textures.
**Batch aspect ratio conversion.** Outpainting's primary production use case: converting 1:1 product photos to 16:9 for website hero images, 4:3 to 1:1 for Instagram, etc. Pipeline: (1) receive image + target aspect ratio, (2) compute canvas expansion needed, (3) classify content type, (4) route to appropriate ControlNet configuration, (5) generate with incremental expansion, (6) QA check — CLIP similarity between original + expanded image (too high = nothing new, too low = hallucinated), structural continuity (edge alignment at original border), color consistency (histogram comparison). Throughput on [L40S](/hardware/nvidia-l40s): 30–60 images/hour for complex (ControlNet) outpaint, 80–120 for simple (texture).
**Panorama generation.** Sequence of overlapping photos stitched and outpainted to fill missing edges. Pipeline: (1) SIFT/RANSAC feature matching for rough alignment, (2) perspective warp to common plane, (3) multi-band blending for seams, (4) outpainting to fill irregular borders. Step 4 is the quality bottleneck — panoramic borders are long and thin, the worst case for outpainting (minimal context along one axis). Mitigation: expand panorama to nearest standard aspect ratio, fill thin border strips at 64–128 px increments with content-aware guidance. For recommended models, see [Llama 3.3 70B](/models/llama-3-3-70b).
What breaks
Failure modes operators see in the wild.
**Visible seam at original border.** Symptom: expanded image shows a clear horizontal/vertical line where original content meets generated content. Cause: diffusion model starts denoising from noise at the border — generated pixels transition from structured (original side) to generated (border side) without smooth blending. Mitigation: expand mask 32–64 px into original image (overlap zone) — model re-generates this overlap region, blending original and new content seamlessly. Post-generation: Poisson blending at border for remaining seams.
**Degrading structure with distance.** Symptom: architectural outpainting — first 128 px expansion shows correct window/brick pattern continuation, 256 px shows distorted proportions, 512 px shows surreal/impossible architecture. Cause: diffusion models have no global structural plan — they extend local patterns greedily, and accumulated small errors compound with distance from known content. Mitigation: enforce structural constraints at each expansion step — re-compute edge/depth map from expanded result, validate structure against original (columns stay vertical, lines don't curve), abort and retry if structural drift detected. Cap expansion at 25–30% of original dimension per side for structural content; beyond that, outpainting breaks.
**Style drift.** Symptom: photo outpainting — original is warm sunset lighting, expansion transitions to neutral mid-day lighting at the edge. Cause: diffusion models optimize local consistency — as the generation moves away from original pixels, the model's bias toward "average" scene statistics dominates over the original image's environmental conditions (lighting, weather, color grade). Mitigation: inject original image statistics into generation — compute color histogram, lighting temperature, contrast curve from original, apply as post-processing correction to expanded region. Use IP-Adapter (image prompt adapter) to condition entire generation on original image style — adds 2–4 GB VRAM, improves style consistency 15–20%.
Hardware guidance
**Hobbyist tier ($300–600).** [RTX 3060 12GB](/hardware/rtx-3060-12gb): SDXL outpainting at 8–15 seconds per expansion. Flux Fill FP8/NF4 at 10–20 seconds but 12 GB is VRAM floor — limit to 256 px expansions. [RX 7600 XT](/hardware/rx-7600-xt) at 16 GB: SDXL outpainting at 10–20 seconds — AMD's ComfyUI ecosystem has ControlNet gaps, expect manual debugging. [Intel Arc B580](/hardware/intel-arc-b580) at 12 GB: SDXL outpainting at 12–25 seconds via Intel IPEX.
**Enthusiast tier ($1,500–2,500).** [RTX 4090](/hardware/rtx-4090) at 24 GB: Flux Fill at 3–6 seconds per expansion, Flux Fill + 1 ControlNet at 5–10 seconds. Fits 512 px expansions at 1024 base. [RTX 5090](/hardware/rtx-5090) at 32 GB: Flux Fill + 2 ControlNets (depth + canny) + IP-Adapter for style preservation — the complete outpainting toolkit on single consumer GPU. [RTX 5080](/hardware/rtx-5080) at 16 GB: Flux Fill at 4–8 seconds but cannot fit Flux Fill + ControlNet simultaneously — requires sequential offloading, doubling generation time.
**SMB tier ($6,000–15,000).** [RTX 6000 Ada](/hardware/rtx-6000-ada) at 48 GB: Flux Fill + 3 ControlNets + IP-Adapter + batch=4 — production panorama and aspect ratio conversion at 30–60 complex outpainting operations/hour. [L40S](/hardware/nvidia-l40s) at 48 GB: identical in datacenter — 24/7 aspect ratio conversion service.
**Enterprise tier ($25,000+).** [A100 80GB SXM](/hardware/nvidia-a100-80gb-sxm): all ControlNet combos with batch=8. Flux Fill at 2048×2048 expanding to 3072×2048 in single pass (1024 px expansion). Overkill for outpainting-only; shared with [text-to-image](/tasks/text-to-image) workloads.
**VRAM planning for expansion size.** 1024×1024 → 1536×1024 (50% area increase): +50% VRAM. 1024 fill requires ~16 GB Flux Fill alone; +50% = ~24 GB. 1536×1536 (125% increase): ~36 GB — exceeds single consumer GPU. Plan hardware by maximum expansion size: 256 px (30% area) on 12–16 GB, 512 px (80% area) on 24 GB, 1024 px (200% area) on 48+ GB. For larger expansions, implement tiled outpainting — expand in 256 px tiles along border, one tile at a time, each within VRAM budget.
Runtime guidance
**ComfyUI vs Diffusers — outpainting pipeline architecture.**
[ComfyUI](/tools/comfyui) with the "Pad Image for Outpainting" node is the standard outpainting interface. The node accepts an image + target dimensions + padding mode (reflect, zero, replicate) → outputs padded image + mask. Connect to Flux Fill or SDXL Inpainting pipeline. For incremental expansion, chain multiple Pad → Fill blocks in sequence — ComfyUI's node graph naturally represents iterative expansion. Custom nodes: "Outpaint Direction" node expands only specified sides (top/bottom/left/right); "Seamless Outpaint" node implements overlap blending to eliminate border seams.
[Automatic1111 WebUI](/tools/automatic1111) (SD WebUI Forge) has a dedicated "Outpaint" mode in img2img → Script dropdown. Select "Outpainting mk2" script, set pixels to expand per side, generate. Simpler than ComfyUI's node graph for single-step expansion. Limitation: SDXL only (no Flux), no ControlNet conditioning, poor iterative expansion support. Use for quick SDXL landscape outpainting; avoid for production.
[Diffusers](/tools/diffusers) for programmatic outpainting pipelines. Python workflow: (1) load image + compute expanded canvas, (2) create mask (1 for original, 0 for border), (3) initialize pipeline (`FluxFillPipeline` or `StableDiffusionXLInpaintPipeline`), (4) call `pipeline(prompt=prompt, image=expanded_canvas, mask_image=mask)`, (5) save result. For iterative expansion: loop with decreasing expansion size. For ControlNet: load `ControlNetModel` and pass to pipeline. Diffusers gives full control over generation parameters programmatically — essential for batch processing and API integration.
**Incremental expansion script pattern** (Python pseudocode):
```
for direction in ["top", "bottom", "left", "right"]:
for increment in [256, 256, 256]: # 3× 256px = 768px total
expanded, mask = pad_image(current_img, direction, increment)
current_img = pipeline(prompt, expanded, mask)
```
Each iteration uses the previous step's output as input — the generated content becomes "known" for the next step. This is the highest-quality outpainting strategy, trading 3–4× generation time for 25–40% quality improvement over single-pass expansion.