OutpaintAnyProjection
Outpainting in any view, then folding the result back into the world
- image
- mask
- final_image
- needs_inpaint_mask
Ordinary outpainting works on flat images. This node works on projections. OutpaintAnyProjection takes an image in any of the pack's three projections (pinhole, fisheye, equirectangular), extracts a patch from any view direction you pick, runs Flux inpainting on that patch, and reprojects the filled result back into the original canvas - expanding the image where the camera "didn't see." It's the node that turns a 90° pinhole photo into a full 180° fisheye, or grows a 180° fisheye into a 360° panorama, with the geometry kept consistent the whole way.
That last bit is the whole point. If you outpaint a flat crop and stitch it, the perspective never lines up - a straight line in the source comes out bent in the extension. By doing the outpaint in a patch projection (default pinhole, 90° fov, aimed at patch_phi/patch_theta) and then reprojecting the patch back into the target projection, the generated content lands with the correct lens distortion for where it sits in the frame. The pack's Outpaint_fisheye180.json workflow chains five passes of this node to go 90° pinhole → full 180° fisheye, and sbs180_workflow.json uses it to synthesize the second eye of a VR180 stereo pair.
How it works
Step one: reproject the whole input onto the output canvas. Step two: rotate the view to the patch direction and extract a square patch plus its coverage mask. Step three: Flux-inpaint the masked (hole) region. Step four: reproject the inpainted patch back onto the canvas, compositing it only where the original had holes. Anything still uncovered after back-projection comes out on needs_inpaint_mask, so you can chain passes and keep iterating until the mask is empty.
The inputs that matter
- input_projection / input_horiz_fov and output_projection / output_horiz_fov - the projection you're coming from and the one you're building. The fov is where people go wrong; it must match your actual source image.
- output_width / output_height - default 4096². That's a big canvas; you can drop it for tests.
- patch_phi / patch_theta - where in the world the patch is aimed. This is your camera-move control: sweep phi and each patch extends a different direction.
- patch_res - patch resolution (default 1024); the outpaint's generation budget.
- prompt - what to draw in the hole. As with all inpainting, describe the scene so the fill blends.
- num_inference_steps (50), guidance_scale (30), mask_blur (30) - Flux inpainting settings.
- cached - keep the Flux pipeline loaded between passes (or from a previous node); set true when chaining passes, false if VRAM is tight.
- debug - set true and it skips inpainting, returning the raw patch so you can verify the view before spending minutes generating.
What comes out
final_image (the grown canvas) and needs_inpaint_mask (what's still hole). Both are useful: the mask is your "keep going" signal.
Installing it
This node is the poster child for the pack's automatic dependency setup. It needs ComfyUI-Flux-Inpainting, which install.py clones into custom_nodes/inpainting_flux (skipping if you already have that pack under any usual folder name), plus the Flux model weights - a multi-GB download. ComfyUI Manager → Custom Nodes Manager → camera-comfyUI → Install → restart; or clone and run python install.py. If the node errors with "FluxNF4Inpainting is not available," re-run install.py.
Common issues
- Patch is mostly gray or garbage - check the patch first with
debug; you're probably aimingpatch_phi/patch_thetaat a region with no source data. - Seams visible at patch edges - raise
mask_blur(default 30) so the fill feathers into the source. - VRAM blowups on the default 4096² output - drop output resolution for iteration, then scale up for the final pass.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| input_projection | COMBO | source projection | |
| input_horiz_fov | FLOAT | 90.000–360 | — |
| output_projection | COMBO | final projection | |
| output_horiz_fov | FLOAT | 180.000–360 | — |
| output_width | INT | 40961–8192 | — |
| output_height | INT | 40961–8192 | — |
| patch_projection | COMBO | patch projection | |
| patch_horiz_fov | FLOAT | 90.001–180 | — |
| patch_res | INT | 10241–8192 | — |
| patch_phi | FLOAT | 45.00-180–180 | — |
| patch_theta | FLOAT | 0.00-90–90 | — |
| prompt | STRING | — | |
| num_inference_steps | INT | 5010–60 | — |
| cached | BOOLEAN | false | — |
| guidance_scale | FLOAT | 30.000.1–30 | — |
| mask_blur | INT | 300–512 | — |
| maskopt | MASK | — | |
| debugopt | BOOLEAN | false | If true, skip inpainting and output patch |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| final_image | IMAGE | — |
| needs_inpaint_mask | MASK | — |