Pano Outpaint Canvas
Outpaint flat frames onto a VR canvas without guessing the aspect ratio
- images
- canvas_images
- padding_mask
- info
If you've ever tried to outpaint a regular video into something meant for a VR headset, you know the failure mode: you extend the frame, the model happily invents a wider scene, and then the equirectangular conversion comes out looking like a funhouse mirror because your canvas was never the right shape. This node exists so that mistake stops happening. It's the front door of the Muffins-Flat-2-Panoramic pack: you feed it flat frames, it hands back a correctly-proportioned gray canvas plus a mask of the area you still need to generate.
The pack's whole thesis is "outpaint flat, prewarp later." Outpainting itself works the same way it always has - place the original on a bigger canvas, mask the empty space, run your sampler on it - but if the canvas ratio doesn't match your target projection, the final warp bends the geometry into nonsense. PanoOutpaintCanvas takes the ratio decision out of your hands and locks it to the projection you picked.
How it works
You set vr_format to either vr180_equirect_1_1 (a square 1:1 canvas for a half-sphere 180 viewer) or padded_360_equirect_2_1 (a 2:1 canvas for 360). Then three numbers size everything:
longest_side- the base canvas size, rounded up to a multiple of 64 (704 default). It's the "how big do we want the scene" dial.outpaint_scale- how much the final canvas grows beyond that base while keeping the ratio (default 2).source_scale- how large the original frame sits inside the canvas (default 1 = as big as fits). Drop it below 1 to give the model more room on all sides.
Your source is resized once to fit the base canvas, then centered on the bigger gray canvas. The fill is a flat 0.5 gray, not black - outpaint models generally behave better starting from mid-gray than from a black void, which is the same "make the model invent rather than lean on what's there" trick that has circulated for masked editing.
The three outputs
canvas_images- your centered frames, ready to feed the VAE-encode → sampler side of an outpaint graph.padding_mask- the important one. It's1.0everywhere the gray padding is (what you want generated) and0.0over the source. White = generate here, the standard ComfyUI mask convention.info- a string with canvas size, source size and offset. Pipe it into a text node if you want the numbers without squinting.
mask_feather softens the mask inward over the source edge in pixels. It's your seam-blend dial: a little feather (think single digits) keeps the model from drawing a hard border where the original frame ends.
Installing it
Everything in this pack is one dependency-light repo - requirements.txt is literally numpy - so install is quick either via ComfyUI Manager (search "Muffins-Flat-2-Panoramic-node") or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Ragamuffin20/Muffins-Flat-2-Panoramic-node.git
cd Muffins-Flat-2-Panoramic-node
python -m pip install -r requirements.txt
Then restart ComfyUI. No model files to download. The author (who also publishes 180/360 LoRA packs and the matching workflow separately, since workflow JSONs are intentionally not in the repo) pitches this as a video pipeline, and the node batch-processes frames, so a whole clip gets the same canvas in one pass.
Where people get burned
The usual mistake is wiring padding_mask into a mask input backwards - flip it and the model redraws your source while leaving the padding alone. White = generate. Second: don't crank outpaint_scale to 4 on a small longest_side and expect fine detail; you're asking the sampler to invent most of the frame, so give it a real base size. Otherwise this is one of the least fiddly nodes in the pack - set the ratio, hit go.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| vr_format | COMBO | vr180_equirect_1_1 | 2 options: vr180_equirect_1_1, padded_360_equirect_2_1 |
| longest_side | INT | 704256–16384 | — |
| source_scale | FLOAT | 1.000.1–1 | — |
| outpaint_scale | FLOAT | 2.001–4 | — |
| mask_feather | INT | 00–512 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| canvas_images | IMAGE | — |
| padding_mask | MASK | — |
| info | STRING | — |