You have a great image, but the frame is too tight. The subject’s head touches the top edge, the scene is square when you need 16:9, or you want more of the background. Outpainting fixes this. It grows the canvas and lets the model paint new content that matches what is already there.
ComfyUI does outpainting very well once you understand one idea: outpainting is just inpainting with a mask built for you. You pad the image, the padding becomes the masked area, and an inpainting model fills it in.
This guide walks through the basic built-in workflow, the much better Flux.1 Fill workflow, the settings that control seams and consistency, how to extend to any aspect ratio, and what to do when the new area looks wrong. It follows the official ComfyUI docs and template library as of November 2026.
- Key node:
Pad Image for Outpainting. Set pixels for left, top, right and bottom, plusfeathering. It outputs the bigger image and a mask. - Use an inpainting model. A normal checkpoint gives ugly seams. Best local choice: Flux.1 Fill dev.
- Fastest start: Workflow > Browse Templates > search “Flux.1 Outpaint”.
- Extend in steps of about 256 to 512 pixels per side rather than doubling the image in one go.
- Describe the whole scene in the prompt, not only the new area.
- Visible seam? Raise feathering, grow the mask, and keep denoise at 1.0 for the padded area.
How Outpainting Works in ComfyUI
Every outpainting workflow follows the same three steps:
- Pad: the
Pad Image for Outpaintingnode adds empty pixels around your image. - Mask: the same node creates a mask. White (masked) is the new padding, black is your original image.
- Fill: an inpainting model generates content only in the masked area, using the original pixels as context.
So everything you know about inpainting applies here. If you have not used inpainting yet, or it gives you grey blobs, read our ComfyUI inpainting fix guide as well.
The Pad Image for Outpainting node
| Input | What it does |
|---|---|
image |
Your source image |
left, top, right, bottom |
How many pixels to add on each side. Use 0 for sides you do not want to extend. |
feathering |
Softens the mask edge where old meets new. Higher values give smoother transitions. |
It has two outputs: IMAGE (the padded image) and MASK (the area to fill). Wire both into your inpainting chain.
Which Model Should You Use?
Outpainting needs a model trained for inpainting. A regular text-to-image checkpoint will work in a pinch, but it usually leaves a hard line or a colour shift at the border.
| Model | Quality | VRAM (rough) | Best for |
|---|---|---|---|
| SD 2.1 512-inpainting-ema | Basic | 4 GB+ | Learning the workflow on any GPU |
| SD 1.5 / SDXL inpainting checkpoints | Good | 4 to 8 GB | Older styles and LoRAs you already use |
| Flux.1 Fill dev | Excellent | 12 GB+ (fp8/GGUF for less) | Realistic, consistent extensions |
| FLUX.2 Klein 9B (image extend template) | Excellent | 12 GB+ | Newer workflow in the template library |
For most people with a 12 GB or bigger card, Flux.1 Fill dev is the sweet spot. Our guide to using Flux covers the model family if you are new to it.
Method 1: The Basic Outpainting Workflow
This is the official beginner example. It is light enough to run on almost any GPU and is perfect for learning how the nodes connect.
- Download the model: get
512-inpainting-ema.safetensorsfrom the Comfy-Org stable_diffusion_2.1_repackaged page on Hugging Face. - Place it in
ComfyUI/models/checkpoints/. Not sure where folders go? See our ComfyUI model folders cheat sheet. - Load the workflow: download the outpaint example image from the ComfyUI docs and drag it onto the canvas. The workflow is stored in the image metadata.
- Select the checkpoint in the
Load Checkpointnode. - Upload your image in the
Load Imagenode. - Set padding in
Pad Image for Outpainting, for example right 256 and left 256. - Write a prompt that describes the full scene.
- Press Run (or
Ctrl + Enter).
In this workflow the padded image and mask go into VAE Encode (for Inpainting), which has a grow_mask_by setting. Growing the mask a few pixels into the original image helps the model blend the edge.
Method 2: Flux.1 Fill Dev Outpainting (Recommended)
Flux.1 Fill dev is Black Forest Labs’ dedicated inpainting and outpainting model. It follows prompts closely and keeps lighting and texture consistent with the original image, which is exactly what outpainting needs.
Step 1: Download the model files
The Fill model is gated. Open the black-forest-labs/FLUX.1-Fill-dev page on Hugging Face, sign in and accept the license before downloading.
| File | Folder |
|---|---|
flux1-fill-dev.safetensors |
ComfyUI/models/diffusion_models/ |
clip_l.safetensors |
ComfyUI/models/text_encoders/ |
t5xxl_fp16.safetensors |
ComfyUI/models/text_encoders/ |
ae.safetensors |
ComfyUI/models/vae/ |
If you already run the full Flux.1 dev text-to-image workflow, you only need the fill model. The text encoders and VAE are shared.
Step 2: Load the template
- Update ComfyUI first so the template library is current. Our ComfyUI update guide covers every install type.
- Open Workflow > Browse Templates and search Flux.1 Outpaint.
- Click the template. If files are missing, ComfyUI lists them so you can download them.
Step 3: Check the loaders and run
Load Diffusion Model:flux1-fill-dev.safetensors.DualCLIPLoader: clip_name1t5xxl_fp16.safetensors, clip_name2clip_l.safetensors, type flux.Load VAE:ae.safetensors.- Upload your image to
Load Imageand set the padding. - Edit the prompt, then press Run.
The Flux workflow passes the padded image and mask through InpaintModelConditioning instead of the older inpainting VAE encode. The template uses a high FluxGuidance value, which is normal for the Fill model. Leave it as it is unless you have a reason to change it.
Low VRAM? Use an fp8 version of the text encoder (t5xxl_fp8_e4m3fn) or a GGUF build of the fill model. Our CUDA out of memory fix lists more ways to fit big models.
Settings That Matter
| Setting | Where | Good starting value | Effect |
|---|---|---|---|
| Padding per side | Pad Image for Outpainting | 256 to 512 px | Bigger jumps mean less context and more invented content |
| feathering | Pad Image for Outpainting | 40 to 100 | Smooths the seam. Too high can blur the original edge. |
| grow_mask_by | VAE Encode (for Inpainting) | 6 to 16 | Lets the model repaint a thin strip of the original for blending |
| denoise | KSampler | 1.0 | The padded area is empty, so it needs full denoise |
| steps | KSampler | 20 to 30 | More steps add detail in the new area |
| Final size | Original + padding | Divisible by 8 (16 for Flux is safest) | Odd sizes can cause edge artifacts or errors |
Extend to a New Aspect Ratio
A common job is turning a square image into a 16:9 banner or a 9:16 phone wallpaper. Work out the padding like this:
| Start | Target | Padding | Result |
|---|---|---|---|
| 1024 x 1024 | 16:9 landscape | left 400, right 400 | 1824 x 1024 |
| 1024 x 1024 | 9:16 portrait | top 400, bottom 400 | 1024 x 1824 |
| 1024 x 1024 | 3:2 landscape | left 256, right 256 | 1536 x 1024 |
| 832 x 1216 | 1:1 square | left 192, right 192 | 1216 x 1216 |
For large jumps like square to 16:9, do it in two passes: extend one side, save, then load the result and extend the other side. Each pass then has more real image to copy from.
When the outpainted image is ready, you can sharpen it up with an upscale pass. See our ComfyUI upscale guide.
Tips for Seamless Results
- Prompt the whole picture. Write “a woman in a red coat on a rainy city street at night, neon signs, wet pavement” rather than “more street”. The model needs to know what the full scene is.
- Extend toward simple areas first. Sky, walls, grass and floors extend cleanly. Extending through a person’s body or a busy crowd is harder.
- Try several seeds. Outpainting is less predictable than text-to-image. Batch 4 images and pick the best.
- Fix bad areas with inpainting. If one corner is wrong, mask just that part and inpaint it again instead of redoing everything.
- Match the style with a reference. For stylised art, an IPAdapter reference can keep the new area on style. See our ComfyUI IPAdapter guide.
- Keep the original pixels. To avoid any change to the original, composite it back on top after generation using
ImageCompositeMasked.
Other Outpainting Options
The ComfyUI template library has more outpainting workflows worth knowing about:
| Template | Runs | Notes |
|---|---|---|
| Image Outpainting: FLUX.2 Klein 9B | Local | Newer image extend workflow |
| Flux.1 Fill dev OneReward | Local | Fill model tuned with OneReward |
| Wan2.1 VACE outpainting | Local | Extends video frames, not just stills |
| Bria, Flux.1 Expand, Nano Banana Pro outpaint | API nodes (paid credits) | No local GPU needed |
API nodes are handy if your GPU is small, but they cost credits per image. Local models are free to run once downloaded.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Hard visible seam | Low feathering or a non-inpainting model | Raise feathering, grow the mask, switch to Flux.1 Fill or an inpainting checkpoint |
| New area is grey or flat colour | Denoise below 1.0, or wrong encode node | Set denoise to 1.0 and use the inpainting encode or InpaintModelConditioning |
| Colours do not match | Standard VAE encode on an inpainting model | Use the workflow from the template without swapping nodes |
| Repeated objects or a mirrored scene | Padding too large for the context | Extend in smaller steps and add detail to the prompt |
| Template shows red or missing nodes | Old ComfyUI version | Update ComfyUI, then reload the template |
| 401 or access error downloading the fill model | License not accepted | Accept the license on the Hugging Face model page while signed in |
| Out of memory at large sizes | Image too big for VRAM | Use fp8 or GGUF models, or extend one side at a time |
| “Prompt outputs failed validation” | A loader is empty or a file name is wrong | See our validation error fix |
FAQ
What is the difference between inpainting and outpainting?
Inpainting changes an area inside the image. Outpainting adds new area outside the original borders. In ComfyUI both use the same models; only the way the mask is built differs.
Can I outpaint with a normal SDXL or Flux dev checkpoint?
You can, but results are weaker. Dedicated inpainting or fill models blend the edge far better.
How much can I extend in one go?
About 25 to 50 percent of the image size per side works well. For more, run several passes.
Is Flux.1 Fill dev free for commercial use?
It is released under the FLUX.1 [dev] non-commercial license. Read the license on the Hugging Face page before using outputs commercially.
Why does the original part of my image change slightly?
Feathering and grow_mask_by let the model repaint a thin strip of the original for blending, and VAE encoding is slightly lossy. Composite the original back on top if you need it pixel perfect.
Can I outpaint video in ComfyUI?
Yes. The Wan2.1 VACE and LTX video templates include outpainting workflows that extend every frame.
Does outpainting work on Mac?
Yes, ComfyUI runs on Apple Silicon. Flux models are slower there, so start with smaller padding.




