Add multi-view Mesh Refiner node with spatial blending#125
Open
cuzelac wants to merge 1 commit into
Open
Conversation
Add a new "Mesh Refiner Multi-View" node that refines meshes using per-view spatial blending rather than the existing single-view concat fusion approach. Pipeline changes (trellis2_image_to_3d.py): - sample_mesh_slat_multiview(): combines mesh encoding/upsampling from sample_mesh_slat() with multi-view spatial blending samplers, building per-view conditioning and using FlowMultiViewGuidanceInterval samplers for position-aware blending across views - refine_mesh_multiview(): orchestrates the full multi-view refinement pipeline with named view inputs (front/back/left/right), per-view conditioning, and multi-view sampling for both shape and texture Node changes (nodes.py): - Trellis2MeshRefinerMultiView: ComfyUI node with front_image (required) plus optional back_image, left_image, right_image inputs, with front_axis and blend_temperature controls for spatial blending Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
|
This new node gives significant improvements over the single-view refiner when using the multi-vew generator node. |
|
your code does seem to improve MV, i had claude make it as a standalone node that you copy into the trellis folder after updating trellis, so you don't have to reintegrate it every time |
cuzelac
added a commit
to cuzelac/ComfyUI-Trellis2-MultiViewRefiner
that referenced
this pull request
Apr 19, 2026
Standalone ComfyUI custom node that adds the Trellis2MeshRefinerMultiView node. Monkey-patches sample_mesh_slat_multiview and refine_mesh_multiview onto Trellis2ImageTo3DPipeline lazily (on first node execution) so the addon is agnostic to sibling-package load order under ComfyUI's loader. Method bodies are ports of the tested implementation from visualbruno/ComfyUI-Trellis2#125 — test matrix covered front-only, front+back, and all-4-view inputs at 512/1024/1536. Credit to bribblej-web for suggesting the drop-in packaging pattern on the PR thread. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sample_mesh_slat_multiview()pipeline method combining mesh encoding/upsampling with multi-view spatial blending samplersrefine_mesh_multiview()pipeline method orchestrating the full multi-view refinement pipeline for shape and textureTesting
All 6 tests passed against ComfyUI with RTX 5090 (32GB VRAM):
Trellis2MeshRefinerMultiViewappears in ComfyUI underTrellis2Wrappercategory with correct input schema:front_imagerequired,back_image/left_image/right_imageoptional.front_imageconnected, no back/left/right. Completed without error, produced valid GLB.front_image+back_imageonly. Completed without error, produced valid GLB.Tests 2–6 ran in a single workflow: generation executed once, then 5 refiner branches ran serialized via
Trellis2Continuegates sharing the same input trimesh. All 6 GLB exports (1 pre-refine + 5 refined) produced successfully.Additionally, multi-view vs single-view quality comparison was done across 5 rounds of optometrist-style pairwise evaluation (MR Rounds 1–5). Multi-view refiner produces better fine detail in model recesses and reduced bilateral symmetry bleed compared to single-view.
🤖 Generated with Claude Code