Files
styletransfer-ComfyUI-TRELL…/__init__.py
T
styletransferandClaude Opus 4.5 5d0cc8aa0a Initial commit: ComfyUI-TRELLIS2_Motion node package
Features:
- 8 ComfyUI nodes for TRELLIS2 video-to-3D processing
- Onion skinning with configurable frame interval
- Multiple rendering modes (PBR, wireframe, cel, normal, depth)
- 4 lighting presets (studio, outdoor, dramatic, flat)
- Post-processing effects (bloom, DoF, motion blur, outlines)
- Progress bars and auto model download
- 5 example workflows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 13:30:04 -05:00

69 lines
2.5 KiB
Python

"""
ComfyUI-TRELLIS2_Motion - Video to 3D Mesh Reconstruction with Effects
A comprehensive ComfyUI node package that uses Microsoft's TRELLIS2 to transform
video footage into 3D mesh reconstructions with advanced rendering effects.
Features:
- Single image to 3D mesh conversion
- Video batch processing
- Camera trajectory control (orbit, dolly, pan)
- Multiple rendering modes (PBR, wireframe, cel shading)
- Onion skinning for motion visualization
- Post-processing effects (bloom, DoF, motion blur)
"""
import logging
logger = logging.getLogger(__name__)
# Node imports
from .nodes.trellis_predict import Trellis2Predict
from .nodes.video_to_meshes import VideoToMeshes, MergeMeshSequences
from .nodes.camera_trajectory import CameraTrajectory
from .nodes.mesh_renderer import MeshRenderer
from .nodes.mesh_sequence_renderer import MeshSequenceRenderer
from .nodes.onion_skinning import OnionSkinning
from .nodes.rendering_effects import RenderingEffects
from .nodes.combined_node import Trellis2VideoAngleShift
# Collect all node mappings
NODE_CLASS_MAPPINGS = {}
NODE_DISPLAY_NAME_MAPPINGS = {}
# Core nodes
NODE_CLASS_MAPPINGS["Trellis2Predict"] = Trellis2Predict
NODE_DISPLAY_NAME_MAPPINGS["Trellis2Predict"] = "TRELLIS2 Predict (Image to 3D Mesh)"
NODE_CLASS_MAPPINGS["VideoToMeshes"] = VideoToMeshes
NODE_DISPLAY_NAME_MAPPINGS["VideoToMeshes"] = "Video to Meshes (Batch TRELLIS2)"
NODE_CLASS_MAPPINGS["MergeMeshSequences"] = MergeMeshSequences
NODE_DISPLAY_NAME_MAPPINGS["MergeMeshSequences"] = "Merge Mesh Sequences"
# Camera
NODE_CLASS_MAPPINGS["CameraTrajectory_T2"] = CameraTrajectory
NODE_DISPLAY_NAME_MAPPINGS["CameraTrajectory_T2"] = "Camera Trajectory (TRELLIS2)"
# Rendering
NODE_CLASS_MAPPINGS["MeshRenderer"] = MeshRenderer
NODE_DISPLAY_NAME_MAPPINGS["MeshRenderer"] = "Mesh Renderer (3D to Image)"
NODE_CLASS_MAPPINGS["MeshSequenceRenderer"] = MeshSequenceRenderer
NODE_DISPLAY_NAME_MAPPINGS["MeshSequenceRenderer"] = "Mesh Sequence Renderer"
# Effects
NODE_CLASS_MAPPINGS["OnionSkinning"] = OnionSkinning
NODE_DISPLAY_NAME_MAPPINGS["OnionSkinning"] = "Onion Skinning (Motion Ghosts)"
NODE_CLASS_MAPPINGS["RenderingEffects"] = RenderingEffects
NODE_DISPLAY_NAME_MAPPINGS["RenderingEffects"] = "Rendering Effects"
# Combined convenience node
NODE_CLASS_MAPPINGS["Trellis2VideoAngleShift"] = Trellis2VideoAngleShift
NODE_DISPLAY_NAME_MAPPINGS["Trellis2VideoAngleShift"] = "TRELLIS2 Video Angle Shift"
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]
logger.info(f"ComfyUI-TRELLIS2_Motion loaded {len(NODE_CLASS_MAPPINGS)} nodes")