Nodes/Muffins Flat 2 Panoramic/Convert To VR / Apply Panoramic
ComfyUI Node

Convert To VR / Apply Panoramic

The final prewarp that makes flat frames viewable in VR — and what it won't do

By Ragamuffin20·Created 5 months ago·Updated about a month ago· 19
Convert To VR / Apply Panoramic
  • images
  • vr_frames
  • info
  • viewer_preview_first_frame
  • legacy_preview_first_frame
output_modevr180_equirect_1_1
use_input_sizetrue
output_height1024
yaw0.0
pitch0.0
roll0.0
horizontal_flipfalse
vertical_flipfalse

"Convert To VR" is a slightly hopeful name for what this node does. It does not take your flat video and magically give it depth, it doesn't convert from a fisheye image, and it doesn't crop through a lens radius or mask anything to gray or black. What it does is the panoramic prewarp - the distortion that pre-bends a flat 2:1 or 1:1 image so an equirectangular VR viewer unwraps it straight. It's the last step of the Muffins-Flat-2-Panoramic pipeline, the "make it actually watchable in a headset" node, and its job is deliberately narrow.

That narrowness is a feature. By the time you reach this node, your frames are already outpainted and shaped like the panorama they're meant to be. All that's left is to apply the pole-aware pre-distortion (horizontal detail narrowed near top and bottom) and hand the result to a viewer. Because it does nothing else, it's fast, predictable, and easy to wire into a graph.

What you set

  • output_mode - vr180_equirect_1_1 (square output, half-sphere 180) or padded_360_equirect_2_1 (2:1 output for 360). Same fork as the pack's other panoramic node.
  • yaw, pitch, roll - orientation correction. This is where the auto-estimator plugs in: Estimate Video Orientation can feed these three values directly, which is the intended pairing.
  • horizontal_flip / vertical_flip - mirror fixes when a source came out flipped.
  • use_input_size / output_height - use_input_size on (default) derives output from the input; turn it off and output_height (1024 default) controls it instead.

Outputs

Four sockets, and really two of them matter:

  • vr_frames - the prewarped IMAGE batch. This goes to your video encoder or save node.
  • viewer_preview_first_frame - a single-frame preview batch, for checking the warp without rendering the whole clip.
  • legacy_preview_first_frame - in the current code this is identical to the preview above; it's a naming carryover. Wire the non-legacy one and ignore the fourth socket.
  • info - a string confirming mode, output size, and orientation values.

Where it fits, and where it doesn't

The pack ships two panoramic-finale nodes and they're easy to confuse. apply panoramic (FisheyeToVR180Equirect) converts - it takes a square fisheye or a wide frame and does the projection, lens model, calibration and all. Convert To VR only prewarps already-shaped content. Rough rule: if your input is a raw square fisheye, use the other node; if it's an outpainted flat frame that just needs the viewer distortion applied, use this one. The info output literally states "panoramic prewarp only ... no fisheye conversion, lens, crop, or masked fill" - the author was clearly tired of people expecting otherwise.

Install

It's the same single pack for all of these, and it's dependency-light: requirements.txt is just numpy, no models to download. ComfyUI Manager: search "Muffins-Flat-2-Panoramic-node". Or:

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

Restart ComfyUI. The author's published workflow pairs this node with an outpainting pass and an orientation estimator, and it batch-processes video frames, so the whole clip gets prewarped in one run. Set your mode, wire yaw/pitch/roll from the estimator or by hand, and check the preview frame before encoding anything.

Categoryvideo/utils

Inputs (9)

NameTypeDefaultDescription
imagesIMAGE
output_modeCOMBOvr180_equirect_1_12 options: vr180_equirect_1_1, padded_360_equirect_2_1
use_input_sizeBOOLEANtrue
output_heightINT1024256–8192
yawFLOAT0.0-180–180
pitchFLOAT0.0-90–90
rollFLOAT0.0-180–180
horizontal_flipBOOLEANfalse
vertical_flipBOOLEANfalse

Outputs (4)

NameTypeDescription
vr_framesIMAGE
infoSTRING
viewer_preview_first_frameIMAGE
legacy_preview_first_frameIMAGE