How to use from the
Use from the
Diffusers library
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline

# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("suvadityamuk/TRELLIS-image-large-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-image-large for diffusers-3d

microsoft/TRELLIS-image-large converted into a diffusers-3d pipeline: ordinary Diffusers component folders (config.json + safetensors) plus the object3d_model_index.json sidecar that the package's auto-loader validates before downloading anything. 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

import torch
from diffusers_3d import AutoPipelineForImageTo3D, ImageCondition

pipeline = AutoPipelineForImageTo3D.from_pretrained("suvadityamuk/TRELLIS-image-large-diffusers-3d", dtype=torch.bfloat16).to("cuda")
output = pipeline(ImageCondition(image=rgba), formats=("gaussian", "mesh", "radiance_field"))
gaussians, mesh, radiance_field = output.objects

rgba is a (4, H, W) tensor in [0, 1] whose alpha channel masks the object; the pipeline crops and recentres it as the released code does. formats selects any of sparse_structure, slat, gaussian, mesh, and radiance_field.

Components

Folder Class Released file
image_encoder transformers.Dinov2WithRegistersModel facebook/dinov2-with-registers-large (DINOv2 ViT-L/14 with registers)
sparse_structure_flow_model TrellisSparseStructureFlowModel ss_flow_img_dit_L_16l8_fp16
sparse_structure_decoder TrellisSparseStructureDecoder ss_dec_conv3d_16l8_fp16
slat_flow_model TrellisSLatFlowModel slat_flow_img_dit_L_64l8p2_fp16
gaussian_decoder TrellisSLatGaussianDecoder slat_dec_gs_swin8_B_64l8gs32_fp16
mesh_decoder TrellisSLatMeshDecoder slat_dec_mesh_swin8_B_64l8m256c_fp16
radiance_field_decoder TrellisSLatRadianceFieldDecoder slat_dec_rf_swin8_B_64l8r16_fp16

Both schedulers carry the released sampler settings (25 steps, guidance 5.0 over the 0.5–1.0 interval, rescale_t=3). Weights are stored as released (float16 for the transformers); load with dtype= to pick the compute precision.

Provenance

Converted with diffusers-3d-convert-trellis from diffusers-3d 0.1.0.dev0 against TRELLIS revision 442aa1e1afb9014e80681d3bf604e8d728a86ee7. The conversion renames parameters into the package layout and reformats configs; it does not change any weight value. Tiny-configuration parity tests against the pinned upstream code are part of the package test suite.

License and attribution

TRELLIS weights and architecture: MIT License, Copyright (c) Microsoft Corporation. The DINOv2 image encoder weights are Apache-2.0, Copyright (c) Meta Platforms, Inc. This repository redistributes both under those terms; it is not affiliated with or endorsed by Microsoft or Meta.

TRELLIS paper: Structured 3D Latents for Scalable and Versatile 3D Generation.

Related

The TRELLIS.2 successor of this model is part of TRELLIS.2 everywhere, built on Microsoft's TRELLIS.2.

Downloads last month
103
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for suvadityamuk/TRELLIS-image-large-diffusers-3d

Finetuned
(16)
this model

Paper for suvadityamuk/TRELLIS-image-large-diffusers-3d