ComfyUI Trellis2: Image to 3D, mesh refinement, and PBR texturing in one workflow
ComfyUI Trellis2 brings Microsoft’s TRELLIS.2 image‑to‑3D model into a practical, creator‑friendly ComfyUI pipeline. Starting from one or several reference images, it generates clean meshes, unwraps UVs, bakes PBR textures, and exports GLB assets you can drop into DCCs and game engines. The workflow also covers two advanced cases: refining an existing mesh with image guidance and texturing a mesh directly. If you need high‑fidelity geometry, coherent textures, and predictable exports, this ComfyUI Trellis2 workflow is designed for you.
The graph is organized into clear groups for simple one‑click results, deeper control, mesh‑only outputs, mesh refinement, texture‑only generation, and multi‑view fusion. Under the hood, ComfyUI Trellis2 leverages TRELLIS.2’s native voxel representation and strong compositional understanding to keep structure faithful while preserving fine detail and prompt semantics. Source nodes are provided by the ComfyUI extension visualbruno/ComfyUI-Trellis2.
Note: This workflow can only run on Medium, Large, X Large Machine. 2X Large or larger machines will throw an error.
Key models in ComfyUI Trellis2 workflow
- Microsoft TRELLIS.2‑4B. A 4B‑parameter image‑to‑3D model that uses O‑Voxel structured latents for fast, high‑fidelity mesh and PBR material generation. It handles arbitrary topology and exports PBR‑ready assets. See the model card and repo for details: microsoft/TRELLIS.2‑4B and microsoft/TRELLIS.2.
- Meta DINOv3 ViT‑L/16. A high‑quality visual encoder used for robust image features that improve alignment between input images and generated 3D structure. See facebook/dinov3‑vitl16‑pretrain‑lvd1689m.
- BRIA RMBG‑2.0 (BiRefNet). An image matting model often used to produce clean alpha mattes from references, which helps TRELLIS.2 focus on the subject and reduce background bleed. See briaai/RMBG‑2.0.
How to use ComfyUI Trellis2 workflow
At a high level, every path loads the TRELLIS.2 pipeline, ingests one or more images, generates a voxelized 3D asset, optionally remeshes and simplifies for clean topology, unwraps UVs, bakes PBR textures, and exports a GLB. Use the group that matches your task; all groups are independent and produce their own preview and export.
1) Simple
This is the fastest way to go from a single image to a textured GLB. Load the model with Trellis2LoadModel (#39) and drop in your reference using Trellis2LoadImageWithTransparency (#6). The asset is generated by Trellis2MeshWithVoxelGenerator (#41), lightly simplified by Trellis2SimplifyMesh (#42), and UV‑unwrapped and rasterized by Trellis2PostProcessAndUnWrapAndRasterizer (#38). Export your result with Trellis2ExportMesh (#19) and check it in Preview3D (#43). Use a subject‑centric image with a clean or transparent background for the most consistent geometry and textures.
2) Advanced
Choose this when you want more control over shape and appearance. After loading a reference with Trellis2LoadImageWithTransparency (#47), the advanced generator Trellis2MeshWithVoxelAdvancedGenerator (#51) exposes extra controls for how the voxel shape and texture are inferred. Trellis2PostProcessMesh (#46) cleans up before the unwrap stage, while Trellis2PostProcessAndUnWrapAndRasterizer (#45) performs UVs and texture baking. Use Trellis2ExportMesh (#49) to write the GLB and Preview3D (#44) to evaluate shading and detail.
3) Mesh Refiner
Start here if you already have a mesh and want to improve geometry or align materials to a new reference image. Load your OBJ with Trellis2LoadMesh (#57) and a guiding image with Trellis2LoadImageWithTransparency (#58). Trellis2MeshRefiner (#59) uses TRELLIS.2 features to refine shape while staying faithful to your input mesh. Trellis2Remesh (#53) and Trellis2SimplifyMesh (#54) clean topology; Trellis2MeshWithVoxelToTrimesh (#55) returns a standard triangle mesh. Export with Trellis2ExportMesh (#60) and review in Preview3D (#56).
5) Only_Mesh_Advanced
Use this when you want geometry only and plan to texture elsewhere. Trellis2MeshWithVoxelAdvancedGenerator (#74) focuses on robust shape from your image, then Trellis2Remesh (#70) and Trellis2SimplifyMesh (#76) produce a clean, efficient triangle budget. Convert with Trellis2MeshWithVoxelToTrimesh (#72), export GLB via Trellis2ExportMesh (#75), and inspect in Preview3D (#71). This is ideal for hard‑surface parts like helmets where topology matters most.
6) Only_Mesh_Simple
This is the quick geometry‑only path. Feed an image to Trellis2MeshWithVoxelGenerator (#83), then use Trellis2SimplifyMesh (#85) and Trellis2Remesh (#84) to produce a usable surface, followed by another light Trellis2SimplifyMesh (#82) if needed. Convert with Trellis2MeshWithVoxelToTrimesh (#80), export using Trellis2ExportMesh (#81), and preview in Preview3D (#77). It is a fast way to prototype shapes before full texturing.
7) Texture Mesh
If you have a clean mesh and want PBR textures guided by an image, use this route. Load a reference with Trellis2LoadImageWithTransparency (#86) and your mesh with Trellis2LoadMesh (#91). Trellis2MeshTexturing (#87) generates base color and metallic‑roughness textures aligned to the surface, outputting a textured mesh you can export via Trellis2ExportMesh (#93). PreviewImage (#88, #92) shows the baked maps, and Preview3D (#89) displays shading.
8) Multi‑Mesh
For higher fidelity and fewer ambiguities, provide multiple views of the same subject. Load three images with Trellis2LoadImageWithTransparency (#100, #101, #103), combine them using ImageBatchMulti (#98), then run Trellis2MeshWithVoxelAdvancedGenerator (#102). A light Trellis2SimplifyMesh (#95) and Trellis2PostProcessAndUnWrapAndRasterizer (#96) finalize topology, UVs, and PBR textures. Export with Trellis2ExportMesh (#99) and evaluate in Preview3D (#94).
Key nodes in ComfyUI Trellis2 workflow
Trellis2LoadModel(#39) Loads the TRELLIS.2 pipeline and sets the attention backend. Useflash_attnif your GPU supports it for speed, switch to an alternative backend if you encounter compatibility issues. Reuse the same loaded model across groups to avoid reloading.Trellis2MeshWithVoxelGenerator(#41) The one‑click image‑to‑mesh generator. Adjust theseedfor variations and choose whether the seed isfixedorrandomizeto control repeatability. If you plan to texture externally, route into an “Only Mesh” group to skip UV and texture baking.Trellis2MeshWithVoxelAdvancedGenerator(#51) Exposes separate controls for shape and appearance inference. Use the resolution preset to balance quality and memory; higher settings capture small features but increase VRAM. When using multiple views, keep framing consistent and let this node fuse them for more stable geometry.Trellis2MeshRefiner(#59) Improves an existing mesh guided by a reference image. Increase refinement strength when you want bigger shape corrections; lower it to preserve original proportions and topology. Works best with reasonably clean, watertight inputs.Trellis2Remesh(#53) Rebuilds topology for better edge flow and uniform triangles before UVs. Use it after generation or refinement to stabilize downstream unwrap and texture baking. If your mesh already deforms well, you can keep remeshing conservative.Trellis2SimplifyMesh(#42) Reduces triangle count while preserving shape. Decimate before UV unwrap to shorten bake times, or after unwrap to maintain UV continuity when you must hit strict budgets. Preview at each step to confirm silhouettes and hard edges remain intact.Trellis2PostProcessAndUnWrapAndRasterizer(#38) Handles UV unwrapping and PBR texture baking. Choose atexture_sizethat fits your target platform; larger textures improve fine material detail but cost memory. If your asset needs transparency, select an appropriate material mode and connect alpha in your DCC as needed.Trellis2MeshTexturing(#87) Generates base color and metallic‑roughness textures for a given mesh, aligned to your guiding image. Increasetexture_sizefor fine materials like fabric weave or tiny decals. Keep lighting neutral in the guide image to avoid baking strong highlights into the albedo.Trellis2ExportMesh(#19) Writes GLB with embedded textures. Use descriptive filenames to keep variants organized, and keepextensionasglbfor broad compatibility. Verify the result in the providedPreview3Dnodes before moving to downstream tools.
Optional extras
- Use high‑quality, subject‑centric images. For best results in ComfyUI Trellis2, crop tightly, remove backgrounds, and keep lighting neutral and consistent across views.
- Prefer Multi‑Mesh when you can capture front, three‑quarter, and side views; it improves geometry in self‑occluded regions.
- When topology matters more than textures, run an “Only Mesh” path first, inspect and tweak triangle budgets, then re‑run with texturing if needed.
- If outputs look over‑smoothed, lower simplification or remesh more conservatively before the unwrap stage.
- For references with thin structures or accessories, increase the generation resolution preset in the advanced generator and use a larger texture size during baking.
Resources
- TRELLIS.2 model card: microsoft/TRELLIS.2‑4B
- TRELLIS.2 repository: microsoft/TRELLIS.2
- Original TRELLIS repository: microsoft/TRELLIS
- ComfyUI extension used: visualbruno/ComfyUI‑Trellis2
- Supporting backbones: facebook/dinov3‑vitl16‑pretrain‑lvd1689m, briaai/RMBG‑2.0
Acknowledgements
This workflow implements and builds upon the following works and resources. We gratefully acknowledge visualbruno for ComfyUI-Trellis2 for their contributions and maintenance. For authoritative details, please refer to the original documentation and repositories linked below.
Resources
- visualbruno/ComfyUI-Trellis2
- GitHub: visualbruno/ComfyUI-Trellis2
Note: Use of the referenced models, datasets, and code is subject to the respective licenses and terms provided by their authors and maintainers.
