This ComfyUI node pack allows the user to take a panoramic image and a corresponding depth map, and turn them into a 3D environment, which they can view in an immersive WebXR environment.
This ComfyUI node pack allows the user to take a panoramic image and a corresponding depth map, and turn them into a 3D environment, which they can view in an immersive WebXR environment. It also includes utility nodes to assist with creating equirectangular images.
When this node pack is installed, ComfyUI will launch a web server on the same machine when ComfyUI is initialized. By default, the server will be hosted on port 4443, but this can be changed by modifying the value of SERVER_PORT
at the top of server.py
. As WebXR requires an HTTPS environment to run, a self-signed certificate is generated on first launch, which will display a warning when loaded on most browsers. The web page includes a dropdown to pick from previously saved environments, as well as several controls to adjust the presentation of the environment. The user can turn left or right in the environment with the joysticks on a VR controller, or with A/D and Left/Right on a keyboard. As ComfyUI will always launch this web server on start whenever the node pack is active, you may consider disabling the pack when it is not in use.
/environments
directory with the provided name. The depth
input is optional, and the environment will be displayed as a flat skybox if it is omitted.Popular image diffusion models such as Stable Diffusion and FLUX are capable of generating panoramic style images, though they may benefit greatly from a checkpoint or LoRA trained specifically on 360 degree panoramas. Additionally, including phrases in the prompt such as 'HDRI', 'panoramic image of...', or '360HDR' may improve your results. All images should be generated with a 2:1 aspect ratio, such as 2048x1024. There are many existing tools available in ComfyUI to generate depth maps from images, such as Marigold Depth Estimation and Depth Anything.
This WebXR server included in this repository can be used as a standalone utility by running server.py
manually. The dropdown on the page will display the names of all subdirectories in /environments
, and attempt to load the skybox.png
and depth.png
images in the selected subdirectory. Although the skybox texture is required, the depth map is optional. While running the Environment Visualizer node in ComfyUI will automatically save these files to the correct path, any correctly named images placed in the environments directory can be loaded and viewed.