Instructions to use suvadityamuk/TRELLIS.2-4B-diffusers-3d with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use suvadityamuk/TRELLIS.2-4B-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/TRELLIS.2-4B-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] - Trellis
How to use suvadityamuk/TRELLIS.2-4B-diffusers-3d with Trellis:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- TRELLIS.2
How to use suvadityamuk/TRELLIS.2-4B-diffusers-3d with TRELLIS.2:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Document the plain-PyTorch mesh and CuMesh textured-mesh outputs
Browse files
README.md
CHANGED
|
@@ -28,7 +28,7 @@ pip install "git+https://github.com/suvadityamuk/diffusers.git#subdirectory=pack
|
|
| 28 |
```
|
| 29 |
|
| 30 |
`diffusers-3d` runs every network in plain PyTorch on CPU or GPU. Rendering Gaussian splats needs the optional
|
| 31 |
-
`gsplat` backend;
|
| 32 |
|
| 33 |
## Usage
|
| 34 |
|
|
@@ -44,9 +44,10 @@ output = pipeline(ImageCondition(image=rgba), pipeline_type="512")
|
|
| 44 |
ovoxel = output.objects[0] # OVoxelAsset: dual-grid surface with PBR channels
|
| 45 |
```
|
| 46 |
|
| 47 |
-
`pipeline_type` selects the released preset (`512`, `1024`, `1024_cascade`, `1536_cascade`).
|
| 48 |
-
|
| 49 |
-
|
|
|
|
| 50 |
|
| 51 |
## Components
|
| 52 |
|
|
|
|
| 28 |
```
|
| 29 |
|
| 30 |
`diffusers-3d` runs every network in plain PyTorch on CPU or GPU. Rendering Gaussian splats needs the optional
|
| 31 |
+
`gsplat` backend; the PBR-textured mesh for TRELLIS.2 needs CuMesh (see the package docs).
|
| 32 |
|
| 33 |
## Usage
|
| 34 |
|
|
|
|
| 44 |
ovoxel = output.objects[0] # OVoxelAsset: dual-grid surface with PBR channels
|
| 45 |
```
|
| 46 |
|
| 47 |
+
`pipeline_type` selects the released preset (`512`, `1024`, `1024_cascade`, `1536_cascade`). `formats=("mesh",)`
|
| 48 |
+
returns a vertex-coloured mesh on any device; baking the PBR-textured mesh
|
| 49 |
+
(`pipeline.postprocess_ovoxel(..., output_format="textured_mesh")`) needs CuMesh, which bundles cubvh under NVIDIA's
|
| 50 |
+
non-commercial license; see the package docs.
|
| 51 |
|
| 52 |
## Components
|
| 53 |
|