Muffins-Flat-2-Panoramic-node
A ComfyUI extension with 10 custom nodes.
Nodes (10)
Stretch a normal video frame into a 360° equirectangular panorama
Muffins Flat 2 Panoramic Node
ComfyUI custom nodes for preparing flat image or video frames for panoramic, fisheye, and VR180 workflows.
The main use case is an outpainting pipeline: place a flat frame on a larger ratio-locked panoramic canvas, generate the missing surroundings, then apply a 180 or 360 panoramic prewarp so the result unwraps correctly in a VR/equirectangular viewer.
Workflow files are intentionally not included in this repository.
Nodes
Pano Outpaint Canvas
ComfyUI class name: PanoOutpaintCanvas
Prepares an image batch on a solid gray panoramic canvas and outputs a mask for the new padded/outpaint area.
Inputs:
images: inputIMAGEbatchvr_format:vr180_equirect_1_1orpadded_360_equirect_2_1longest_side: base size for the ratio-locked canvassource_scale: scale for the original source inside the canvasoutpaint_scale: expands the final canvas while preserving the selected projection ratiomask_feather: softens the padding mask inward over the source edge, in pixels
Outputs:
canvas_images: source images centered on the larger canvaspadding_mask: mask where padded/outpaint regions are1.0and source pixels are0.0info: placement and scale summary
Fisheye Lens Warp Only
ComfyUI class name: FisheyeLensWarpOnly
Applies a fisheye-style crop/warp to an image batch without adding new padding. This is useful as a second-pass refinement step after the first outpaint pass has already produced the square frame.
Inputs include:
imagesstrengthrectilinear_fovzoomcenter_xcenter_ylens_radiusedge_fadevignette
Fisheye Projection Only
ComfyUI class name: FisheyeProjectionOnly
Projects frames into a square fisheye-style view for second-pass processing. It can clamp outside-lens pixels to the edge instead of creating a new black padding region.
Apply Panoramic
ComfyUI class name: FisheyeToVR180Equirect
Display name: apply panoramic
Applies the final panoramic projection step for VR-style viewing. The node has two main uses:
- Convert a square 1:1 fisheye image batch into a VR180 equirectangular output.
- Convert a wide 2:1 image or video batch into a 360-degree panoramic/equirectangular output with pole-aware panoramic prewarp.
Recommended output mode for a half-sphere 180 viewer:
vr180_equirect_1_1
Recommended output mode for 360 panoramic output:
padded_360_equirect_2_1
For 360 panoramic mode, feed the node a 2:1 input such as 1024x512, 1536x768, or 2048x1024. The node detects the wide input and applies the 360 prewarp path instead of the square fisheye path.
Useful controls:
fisheye_fov: usually180lens_model:equidistant,equisolid,orthographic, orstereographic; also affects the latitude curve for 360 panoramic prewarpcenter_x/center_y: correct off-center fisheye frameslens_radius: match the circular fisheye radius inside the square frameyaw,pitch,roll: orientation correction;yawalso rotates 360 panoramic output left/righthorizontal_flip/vertical_flip: mirror correction
For 360 panoramic output, fisheye_fov, center_x, center_y, and lens_radius are only relevant to the square fisheye path. Wide 2:1 inputs use the 360 prewarp path.
Convert To VR / Apply Panoramic
ComfyUI class name: ConvertToVR
Workflow-facing node that applies panoramic prewarp only. It does not convert from fisheye, does not crop through a lens radius, and does not mask invalid areas to gray or black. It accepts linked yaw, pitch, and roll values and outputs:
vr_frames: prewarped frames for a 180 or 360 viewerviewer_preview_first_frame: a single-frame preview batch
Estimate Video Orientation
ComfyUI class name: EstimateVideoOrientation
Estimates yaw, pitch, and roll correction values from a sampled image/video batch. The estimator is dependency-light and uses frame luminance/edge structure, so treat its output as a useful automatic starting point that can still be overridden by hand.
Masked Outpaint Guide Fill
ComfyUI class name: MaskedOutpaintGuideFill
Fills masked guide areas for outpaint conditioning while preserving the original unmasked pixels.
Perspective Nodes
The package also includes the earlier perspective-to-panorama helpers:
Perspective2PanoramaPerspective2PanoramaSmallMaskPerspective2Panorama180_NoBlack
Installation
Clone this repository into your ComfyUI custom_nodes folder:
cd C:\AI\comfy\ComfyUI_windows_portable\ComfyUI\custom_nodes
git clone https://github.com/Ragamuffin20/Muffins-Flat-2-Panoramic-node.git
Install requirements if needed:
cd Muffins-Flat-2-Panoramic-node
python -m pip install -r requirements.txt
Restart ComfyUI after installing or updating.
Basic Use
- Add
Pano Outpaint Canvasto your workflow. - Connect an
IMAGEor video-frame image batch toimages. - Choose
vr180_equirect_1_1for a square 180 canvas orpadded_360_equirect_2_1for a 2:1 360 canvas. - Send
canvas_imagesinto your outpaint/inpaint path. - Send
padding_maskto the mask input of the outpainting stage. - For a second pass, use
Fisheye Lens Warp OnlyorFisheye Projection Onlywithout adding new padding. - Send the finished outpaint frames into
Convert To VR / Apply Panoramic. - Use
Estimate Video Orientationwhen you want automatic yaw, pitch, and roll starting values.