Skip to content

Add multi-view Mesh Refiner node with spatial blending#125

Open
cuzelac wants to merge 1 commit into
visualbruno:mainfrom
cuzelac:feature/mesh-refiner-multiview
Open

Add multi-view Mesh Refiner node with spatial blending#125
cuzelac wants to merge 1 commit into
visualbruno:mainfrom
cuzelac:feature/mesh-refiner-multiview

Conversation

@cuzelac

@cuzelac cuzelac commented Mar 12, 2026

Copy link
Copy Markdown

Summary

  • Adds a new "Mesh Refiner Multi-View" node that refines meshes using per-view spatial blending (front/back/left/right) instead of single-view concat fusion
  • Adds sample_mesh_slat_multiview() pipeline method combining mesh encoding/upsampling with multi-view spatial blending samplers
  • Adds refine_mesh_multiview() pipeline method orchestrating the full multi-view refinement pipeline for shape and texture

Testing

All 6 tests passed against ComfyUI with RTX 5090 (32GB VRAM):

  1. Node registrationTrellis2MeshRefinerMultiView appears in ComfyUI under Trellis2Wrapper category with correct input schema: front_image required, back_image/left_image/right_image optional.
  2. Front-only (1 view) — Minimum viable input. Ran with only front_image connected, no back/left/right. Completed without error, produced valid GLB.
  3. Front + back (2 views) — Ran with front_image + back_image only. Completed without error, produced valid GLB.
  4. Resolution 512 — All 4 views, resolution=512. Completed without error.
  5. Resolution 1024 — All 4 views, resolution=1024. Completed without error.
  6. Resolution 1536 — All 4 views, resolution=1536. Completed without error, no OOM. (Note: the generator OOMs at 1536 on this image, but the refiner handles it fine — lighter memory footprint.)

Tests 2–6 ran in a single workflow: generation executed once, then 5 refiner branches ran serialized via Trellis2Continue gates 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

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>
@cuzelac

cuzelac commented Mar 12, 2026

Copy link
Copy Markdown
Author

This new node gives significant improvements over the single-view refiner when using the multi-vew generator node.

@bribblej-web

Copy link
Copy Markdown

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
, as of now its missing some of the newest changes like dino-lock but still working.
file is attached.
you also need to add this to the init.py
from .nodes_multiview_refiner import NODE_CLASS_MAPPINGS as _mv, NODE_DISPLAY_NAME_MAPPINGS as _mvd
NODE_CLASS_MAPPINGS.update(_mv)
NODE_DISPLAY_NAME_MAPPINGS.update(_mvd)
nodes_multiview_refiner.py

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants