TripoSR for diffusers-3d
stabilityai/TripoSR converted into a diffusers-3d pipeline: ordinary Diffusers and Transformers component folders that the installed package loads. Nothing here requires remote code.
Install
pip install git+https://github.com/suvadityamuk/diffusers-3d.git
pip install "git+https://github.com/suvadityamuk/diffusers-3d.git#subdirectory=packages/diffusers-3d"
diffusers-3d runs every network in plain PyTorch on CPU or GPU. Rendering Gaussian splats needs the optional
gsplat backend; the PBR-textured mesh for TRELLIS.2 needs CuMesh (see the package docs).
Usage
from diffusers_3d import AutoPipelineForImageTo3D
pipeline = AutoPipelineForImageTo3D.from_pretrained("suvadityamuk/TripoSR-diffusers-3d").to("cuda")
output = pipeline("chair.png")
mesh = output.objects[0]
frames = pipeline.render_views(output.latents.latents) # (1, 30, 256, 256, 3)
TripoSR is feed-forward: one pass gives triplanes, and marching cubes extracts a vertex-coloured MeshAsset in TripoSR's Z-up frame. Defaults match upstream run.py (256³ grid, threshold 25, foreground ratio 0.85). Inputs without usable alpha are cut out with rembg (u2net, the background extra), as upstream does; pipeline.disable_background_removal() matches --no-remove-bg. The image_encoder is TripoSR's own fine-tuned DINO ViT-B/16, with position embeddings baked at 512 px.
Components
| Folder | Class |
|---|---|
decoder | diffusers_3d.families.triposr.models.TripoSRTriplaneDecoder |
image_encoder | transformers.ViTModel |
transformer | diffusers_3d.families.triposr.models.TripoSRTransformerModel |
Provenance
Converted with diffusers-3d-convert-triposr from diffusers-3d 0.1.0.dev0; the package's family README lists the pinned upstream
revisions and how the conversion maps each tensor. Parity tests against the pinned upstream code are part of the
package test suite.
License and attribution
TripoSR weights and code: MIT License, Copyright (c) 2024 Tripo AI & Stability AI. See LICENSE-MIT
and NOTICE. Not affiliated with or endorsed by Tripo AI or Stability AI.