Instructions to use suvadityamuk/TripoSR-diffusers-3d with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use suvadityamuk/TripoSR-diffusers-3d with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("suvadityamuk/TripoSR-diffusers-3d", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
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.
- Downloads last month
- -
Model tree for suvadityamuk/TripoSR-diffusers-3d
Base model
stabilityai/TripoSR