Combines three powerful stereoscopic tools into one comprehensive package: 1. Core Stereo Generation - Depth-based stereo conversion with GPU acceleration - Advanced fill techniques (Polylines, GPU Warp, Hybrid Edge, etc.) - Edge-aware depth blurring for artifact reduction - Side-by-Side, Top-Bottom, and Red-Cyan Anaglyph output formats 2. Native VR Viewing (Optional - requires PyOpenXR) - Auto-launch directly into VR headset without browser - Support for all VR headsets (Quest, Vive, Index, WMR) - Multiple projection types (Flat, Curved, 180° Dome, 360° Sphere) - Image and video playback support 3. StereoDiffusion AI (Optional - requires diffusers) - AI-powered stereo generation using diffusion models - DDIM inversion with null-text optimization - Bilateral Neighbor Attention for stereo consistency - Works with ComfyUI MODEL/CLIP/VAE or HuggingFace models Changes: - Added native_viewer/ module with PyOpenXR implementation - Added native_nodes.py with 3 VR viewer nodes - Added stereodiffusion_nodes.py with AI stereo generation - Added supporting modules: model_wrappers, model_loader, inversion, stereo_utils, diffusion_utils - Updated __init__.py with graceful optional dependency handling - Consolidated all requirements into single requirements.txt - Comprehensive README with setup guides and troubleshooting - Added NOTICE and licenses/ for proper attribution The package now offers 6+ nodes total with modular installation options. Users can install just the base, or add VR viewing and/or AI generation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
73 lines
2.5 KiB
Python
73 lines
2.5 KiB
Python
"""
|
|
ComfyStereo - Comprehensive Stereoscopic 3D toolkit for ComfyUI
|
|
|
|
Combines three powerful stereo tools:
|
|
1. Stereo Image Generation - Depth-based stereo conversion with GPU acceleration
|
|
2. VR Viewing - Native PyOpenXR viewer for direct VR headset viewing
|
|
3. StereoDiffusion - AI-powered stereo generation using diffusion models
|
|
"""
|
|
|
|
# Import base stereo generation nodes (always available)
|
|
from .GenerateStereo import NODE_CLASS_MAPPINGS as STEREO_NODES
|
|
from .GenerateStereo import NODE_DISPLAY_NAME_MAPPINGS as STEREO_NAMES
|
|
|
|
# Import native VR viewer nodes (optional, requires PyOpenXR)
|
|
try:
|
|
from .native_nodes import NODE_CLASS_MAPPINGS as NATIVE_NODES
|
|
from .native_nodes import NODE_DISPLAY_NAME_MAPPINGS as NATIVE_NAMES
|
|
NATIVE_AVAILABLE = True
|
|
except ImportError as e:
|
|
NATIVE_NODES = {}
|
|
NATIVE_NAMES = {}
|
|
NATIVE_AVAILABLE = False
|
|
print("\n" + "="*60)
|
|
print("PyOpenXR not available. Native VR viewer nodes disabled.")
|
|
print("To enable native VR viewing:")
|
|
print(" pip install -r requirements-native.txt")
|
|
print("="*60 + "\n")
|
|
|
|
# Import StereoDiffusion nodes (optional, requires diffusers)
|
|
try:
|
|
from .stereodiffusion_nodes import NODE_CLASS_MAPPINGS as DIFFUSION_NODES
|
|
from .stereodiffusion_nodes import NODE_DISPLAY_NAME_MAPPINGS as DIFFUSION_NAMES
|
|
DIFFUSION_AVAILABLE = True
|
|
except ImportError as e:
|
|
DIFFUSION_NODES = {}
|
|
DIFFUSION_NAMES = {}
|
|
DIFFUSION_AVAILABLE = False
|
|
print("\n" + "="*60)
|
|
print("StereoDiffusion dependencies not available. AI stereo generation disabled.")
|
|
print("To enable StereoDiffusion:")
|
|
print(" pip install diffusers transformers accelerate einops tqdm scikit-image")
|
|
print("="*60 + "\n")
|
|
|
|
# Combine all node mappings
|
|
NODE_CLASS_MAPPINGS = {
|
|
**STEREO_NODES,
|
|
**NATIVE_NODES,
|
|
**DIFFUSION_NODES,
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
**STEREO_NAMES,
|
|
**NATIVE_NAMES,
|
|
**DIFFUSION_NAMES,
|
|
}
|
|
|
|
# Print status
|
|
print("\n" + "="*60)
|
|
print("ComfyStereo - Loaded Modules:")
|
|
print("="*60)
|
|
print(f"✓ Stereo Image Generation ({len(STEREO_NODES)} nodes)")
|
|
if NATIVE_AVAILABLE:
|
|
print(f"✓ Native VR Viewer ({len(NATIVE_NODES)} nodes)")
|
|
else:
|
|
print(f"✗ Native VR Viewer (not available)")
|
|
if DIFFUSION_AVAILABLE:
|
|
print(f"✓ StereoDiffusion ({len(DIFFUSION_NODES)} nodes)")
|
|
else:
|
|
print(f"✗ StereoDiffusion (not available)")
|
|
print(f"\nTotal: {len(NODE_CLASS_MAPPINGS)} nodes loaded")
|
|
print("="*60 + "\n")
|
|
|
|
__all__ = ['NODE_CLASS_MAPPINGS', 'NODE_DISPLAY_NAME_MAPPINGS'] |