ComfyUI Extension: ComfyUI-DreamCube
360Β° panoramic depth estimation with multi-plane synchronization for ComfyUI, featuring equirectangular-cubemap transformations, cross-face consistency, and boundary blending for seamless depth maps.
Custom Nodes (0)
README
ComfyUI-DreamCube
360Β° Panoramic Depth Estimation with Multi-plane Synchronization for ComfyUI
A ComfyUI custom node pack implementing DreamCube's multi-plane synchronization framework for consistent depth estimation on 360Β° panoramic images.
π Features
- π Projection Conversion: Seamless equirectangular β cubemap transformations
- π― Depth Estimation: Compatible with any ComfyUI depth node (Depth Anything, DA3, MiDaS, Marigold)
- π Multi-plane Synchronization: Cross-face consistency for depth maps
- β¨ Boundary Blending: Eliminates visible seams at cubemap edges
- πͺ Windows Compatible: Pure Python with no platform-specific dependencies
- β‘ GPU Accelerated: Optimized with PyTorch and vectorized operations
π¦ Installation
Method 1: ComfyUI Manager (Recommended)
- Open ComfyUI Manager
- Search for "DreamCube"
- Click Install
- Restart ComfyUI
Method 2: Manual Installation
cd ComfyUI/custom_nodes/
git clone https://github.com/cedarconnor/ComfyUI-DreamCube.git
cd ComfyUI-DreamCube
pip install -r requirements.txt
Then restart ComfyUI.
Method 3: Development Mode
cd ComfyUI/custom_nodes/
git clone https://github.com/cedarconnor/ComfyUI-DreamCube.git
cd ComfyUI-DreamCube
pip install -e .
π Quick Start
Basic Workflow: Equirect β Depth β Equirect
[Load Image] (360Β° panorama)
β
[Equirect to Cubemap]
β
[Extract Face: Front] β [Depth Anything] β
[Extract Face: Back] β [Depth Anything] ββ [Batch Cubemap Depth]
[Extract Face: Left] β [Depth Anything] β β
[Extract Face: Right] β [Depth Anything] β [Cubemap to Equirect]
[Extract Face: Top] β [Depth Anything] β β
[Extract Face: Bottom]β [Depth Anything] β [Save Image]
π Node Reference
Projection Nodes
Equirect to Cubemap
Convert 360Β° equirectangular panorama to 6-face cubemap.
Inputs:
image(IMAGE): Equirectangular input (2:1 aspect ratio)cube_resolution(INT): Resolution per face (256-4096)
Outputs:
CUBEMAP: 6-face cubemap data structure
Cubemap to Equirect
Convert cubemap back to equirectangular format.
Inputs:
cubemap(CUBEMAP): Input cubemapoutput_width(INT): Output width (512-8192)output_height(INT): Output height (256-4096)output_type(ENUM):rgb,depth, orrgbd
Outputs:
IMAGE: Equirectangular panorama
Extract Cubemap Face
Extract single face as IMAGE for processing.
Inputs:
cubemap(CUBEMAP): Source cubemapface(ENUM): Face to extract (front,back,left,right,top,bottom)
Outputs:
IMAGE: Extracted face as standard image
Insert Cubemap Face
Insert/update a face in cubemap.
Inputs:
cubemap(CUBEMAP): Target cubemapimage(IMAGE): Face image to insertface(ENUM): Face to update
Outputs:
CUBEMAP: Updated cubemap
Depth Processing Nodes
Apply Depth to Cubemap Face
Apply depth map to single cubemap face.
Inputs:
cubemap(CUBEMAP): Target cubemapdepth_map(IMAGE): Depth from any depth nodeface(ENUM): Face to apply depth to
Outputs:
CUBEMAP: Cubemap with depth applied
Batch Cubemap Depth
Apply depth maps to all 6 faces at once.
Inputs:
cubemap_rgb(CUBEMAP): RGB cubemapdepth_front/back/left/right/top/bottom(IMAGE): Depth for each faceenforce_consistency(BOOL): Enable boundary blending (default: True)normalization(ENUM):global,per_face, oradaptive
Outputs:
CUBEMAP: Cubemap with depth and consistency
Merge Cubemap Depth
Combine RGB and depth cubemaps into RGBD.
Inputs:
cubemap_rgb(CUBEMAP): RGB datacubemap_depth(CUBEMAP): Depth data
Outputs:
CUBEMAP: Merged RGBD cubemap
Extract Depth Channel
Extract depth as separate cubemap for visualization.
Inputs:
cubemap(CUBEMAP): Source cubemap with depth
Outputs:
CUBEMAP: Depth as RGB cubemap
Normalize Cubemap Depth
Normalize depth values across faces.
Inputs:
cubemap(CUBEMAP): Cubemap with depthmethod(ENUM):global,per_face, oralign_scales
Outputs:
CUBEMAP: Normalized cubemap
Utility Nodes
Cubemap Preview
Visualize all 6 faces in various layouts.
Inputs:
cubemap(CUBEMAP): Cubemap to previewlayout(ENUM):horizontal,cross,vertical, orgridshow_depth(BOOL): Show depth instead of RGB
Outputs:
IMAGE: Preview visualization
Validate Cubemap Seams
Check depth continuity at face boundaries.
Inputs:
cubemap(CUBEMAP): Cubemap with depththreshold(FLOAT): Max acceptable error (0.0-1.0)
Outputs:
is_valid(BOOL): Whether seams are acceptablemax_error(FLOAT): Maximum seam errorreport(STRING): Detailed validation report
Cubemap Info
Display cubemap properties and statistics.
Inputs:
cubemap(CUBEMAP): Cubemap to inspect
Outputs:
info(STRING): Information text
Enforce Depth Consistency
Manually apply boundary blending.
Inputs:
cubemap(CUBEMAP): Cubemap with depthboundary_width(INT): Blending region width (4-64)iterations(INT): Number of smoothing passes (1-10)
Outputs:
CUBEMAP: Smoothed cubemap
Smooth Cubemap Depth
Apply Gaussian smoothing to reduce noise.
Inputs:
cubemap(CUBEMAP): Cubemap with depthsigma(FLOAT): Gaussian kernel sigma (0.1-5.0)
Outputs:
CUBEMAP: Smoothed cubemap
Create Empty Cubemap
Create empty cubemap for manual workflows.
Inputs:
resolution(INT): Face resolution (256-4096)
Outputs:
CUBEMAP: Empty cubemap
π¨ Example Workflows
1. Basic Depth Estimation
Load 360Β° image β Equirect to Cubemap β Extract 6 faces β Apply Depth Anything to each β Batch Cubemap Depth β Cubemap to Equirect β Save
2. High Quality with Consistency
Same as above, but:
- Enable
enforce_consistencyin Batch Cubemap Depth - Add
Enforce Depth Consistencynode withboundary_width=24 - Use
Validate Cubemap Seamsto check quality
3. Depth Visualization
Load 360Β° β Equirect to Cubemap β Process depth β Extract Depth Channel β Cubemap Preview (cross layout) β Save
π§ Advanced Usage
Custom Depth Models
Any ComfyUI depth node that outputs IMAGE type can be used:
- β Depth Anything V2
- β Depth Anything V1
- β DA3 (Depth Anything 3)
- β MiDaS
- β Marigold
- β ZoeDepth
- β Your custom depth model
Manual Face Processing
For fine control:
- Create Empty Cubemap
- Extract each face
- Process individually (depth, upscale, enhance)
- Insert back into cubemap
- Enforce consistency
- Convert to equirect
Batch Processing
Process multiple panoramas:
- Use Loop nodes (if available)
- Process faces in parallel
- Cache intermediate results
βοΈ Configuration
Performance Settings
Memory Management:
- 1024Β² faces: ~4GB VRAM
- 2048Β² faces: ~12GB VRAM
- 4096Β² faces: ~40GB VRAM
Speed Optimization:
- Use
globalnormalization for speed - Reduce
boundary_widthfor faster blending - Lower
iterationsfor consistency enforcement
Quality Settings
High Quality:
cube_resolution= 2048enforce_consistency= Trueboundary_width= 24iterations= 3
Balanced:
cube_resolution= 1024enforce_consistency= Trueboundary_width= 16iterations= 2
Fast:
cube_resolution= 512enforce_consistency= Trueboundary_width= 8iterations= 1
π Troubleshooting
Issue: "Invalid aspect ratio" error
Solution: Equirectangular images must be 2:1 ratio (e.g., 2048Γ1024). Resize your image first.
Issue: Visible seams in output
Solutions:
- Enable
enforce_consistencyin Batch Cubemap Depth - Increase
boundary_width(try 24-32) - Add
Enforce Depth Consistencynode - Use
Smooth Cubemap Depthwith sigma=1.5 - Check depth maps are consistent (use Validate Cubemap Seams)
Issue: Out of memory
Solutions:
- Reduce
cube_resolution(try 512 or 768) - Process faces sequentially instead of batch
- Close other applications
- Use CPU fallback (slower but no VRAM limit)
Issue: Depth maps look wrong
Solutions:
- Check input images are correct faces
- Try different
normalizationmethods - Use
Normalize Cubemap Depthnode - Verify depth node is working correctly (test on single image)
π Technical Details
Coordinate Systems
Equirectangular:
- Longitude: -180Β° to +180Β° (left to right)
- Latitude: +90Β° to -90Β° (top to bottom)
- Aspect ratio: 2:1
Cubemap:
- 6 faces: front, back, left, right, top, bottom
- Each face: square (NΓN pixels)
- Coordinate system: Right-handed, Z-forward
Face Adjacency
[top]
[left][front][right][back]
[bottom]
Depth Consistency
Boundary blending uses weighted average:
- Weight = 1.0 at face center
- Weight = 0.5 at boundary
- Linear interpolation in between
Performance Benchmarks
| Operation | 1024Β² | 2048Β² | Hardware | |-----------|-------|-------|----------| | EquirectβCubemap | 80ms | 250ms | RTX 3060 | | CubemapβEquirect | 75ms | 240ms | RTX 3060 | | Depth Consistency | 120ms | 450ms | RTX 3060 | | Full Pipeline | ~500ms | ~2000ms | RTX 3060 |
π€ Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
π Acknowledgments
This project is based on:
- DreamCube (ICCV 2025) by Yukun Huang, Yanning Zhou, Jianan Wang, Kaiyi Huang, Xihui Liu
- Paper: arXiv:2506.17206
- Code: github.com/yukun-huang/DreamCube
Special thanks to:
- ComfyUI developers for the extensible framework
- Depth Anything team for excellent depth estimation models
- The open-source computer vision community
π Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- ComfyUI Discord: #custom-nodes channel
πΊοΈ Roadmap
v1.1.0 (Planned)
- [ ] Video support with temporal consistency
- [ ] Normal map generation from depth
- [ ] 3D mesh export (OBJ, PLY, GLTF)
- [ ] LoRA integration for style-specific depth
- [ ] Outpainting from partial FOV to 360Β°
v1.2.0 (Future)
- [ ] Multi-resolution processing
- [ ] Depth refinement with diffusion
- [ ] 3D Gaussian Splatting integration
- [ ] Real-time preview mode
- [ ] Batch video processing
π Citation
If you use this node pack in your research or project, please cite:
@inproceedings{huang2025dreamcube,
title={DreamCube: 3D Panorama Generation via Multi-plane Synchronization},
author={Huang, Yukun and Zhou, Yanning and Wang, Jianan and Huang, Kaiyi and Liu, Xihui},
booktitle={ICCV},
year={2025}
}
Made with β€οΈ for the ComfyUI community