What TRELLIS is
TRELLIS turns one picture of an object into a 3D asset. Its representation is a structured latent (SLAT): the voxels of a 64³ grid that touch the object's surface, each carrying a short latent vector that describes the geometry and appearance around it. Generation runs in two stages, both rectified-flow transformers: first which voxels are occupied, then the latent on each one. Decoders then turn the same latent into 3D Gaussians, a radiance field or a mesh.
The page runs microsoft/TRELLIS-image-large on the SAM tab's photo of a beagle, cut out with SAM's own mask, with seed 42. The parts: a 304 M DINOv2 image encoder, flow transformers of 556 M and 600 M parameters, and decoders of 74 M and 85 M. TRELLIS's own code needs CUDA-only libraries, so the recording runs the tab's plain-PyTorch blocks with the released weights on the CPU in float32; the mesh and radiance-field decoders were not run, and the Gaussian renderer is a PyTorch port of mip-splatting's rules (the page's What did not run, and why lists each).
Image tokens
The Image panel shows the condition: the object on black at 518 × 518, read by DINOv2 ViT-L/14 with 4 register tokens. That gives 1 + 4 + 37² = 1,374 tokens of width 1,024 (the class token, the registers and one per 14-pixel patch), taken before the encoder's last norm and normalised. Both stages cross-attend to them. DINOv2 is trained without labels, by self-distillation, to give image and patch features that transfer across tasks; the registers are extra tokens that give the network somewhere to store global information, so that patch tokens stay clean.
The Where a voxel looks panel shows one cross-attention: a cell of the 16³ structure grid at stage 1, block 13, step 13, and the share of its attention that lands on each image patch, the rest going to the class token and the registers.
Stage 1: the sparse structure
Occupancy of the 64³ grid is first compressed by a small VAE into a dense 16³ × 8 latent. The Stage 1 · structure panel's transformer denoises that latent with each of its 4,096 cells as a token (a Linear 8 → 1,024 plus a fixed 3D sin-cos position), through 24 blocks of adaLN from the timestep, self-attention with RMS-normalised queries and keys, cross-attention to the image tokens and an MLP.
The Decoder panel's 3D convolutions turn the final latent into one logit per voxel of the 64³ grid: ResBlocks at 16³, then two 2 × upsamplings, each a convolution to 8 times the channels followed by a 3D pixel shuffle, with 512, 128 and 32 channels. A positive logit means occupied: 10,435 of the 262,144 voxels, about 4 %. The point cloud shows them; drag to turn it.
Rectified flow, with guidance only at high noise
Both stages use rectified flow: data and noise are joined by a straight line, , and the transformer predicts its velocity . Sampling walks from to 0 in 25 Euler steps, on times pushed towards the noisy end:
Classifier-free guidance with scale 5 is applied only while : there , and below it the image pass alone. Guidance is thus kept to the noisy half of the path, where the coarse shape forms. The Stage 1 · structure strip shows , both velocities, and how many voxels decodes to at every step.
Stage 2: the structured latent
The occupied voxels fix the structure; stage 2 fills in the content. It starts from fresh noise, 8 numbers on each of the 10,435 voxels, and denoises them with a second flow transformer, shown in the Stage 2 · structured latent panel. Attention over 10,435 tokens would be expensive, so sparse ResBlocks at 64³ (128 channels) first pool each 2 × 2 × 2 block into one token: 2,373 tokens at 32³ go through 24 blocks like stage 1's, then are unpooled back to the voxels with skip connections.
The ResBlocks use submanifold sparse convolutions: a 3 × 3 × 3 kernel computed only at occupied sites, reading only occupied neighbours, so the output has exactly the input's sparsity and costs scale with the surface, not the volume. The panel colours each voxel by its Gaussians' mean colour or by the 3 leading principal components of its latent; the strip below follows the RMS of and and renders at every step.
Each voxel becomes 32 Gaussians
The Voxel → 32 Gaussians panel shows the decoder: a sparse transformer of 12 blocks, width 768, with attention inside 8³ windows shifted by 4 every other block, as in the Swin transformer. It reads every voxel's 8 numbers and writes 32 × 14 = 448: for each of 32 Gaussians, an offset from the voxel centre (3), a colour (3), a scale (3), a rotation quaternion (4) and an opacity (1). That is 333,920 Gaussians in all.
In 3D Gaussian splatting each Gaussian is a soft ellipsoid with covariance . To render, every Gaussian is projected to a 2D Gaussian on the screen, and the pixels blend them front to back:
Mip-splatting adds a 3D filter that limits how fine a Gaussian can be and a 2D filter that mimics a pixel's footprint, which removes aliasing when the camera zooms. The Rendered panel shows eight views at 160 pixels on a white background.
Where it came from
Earlier text- and image-to-3D models generated one fixed representation: Point-E a point cloud, Shap-E the weights of an implicit function (see the Shap-E tab). TRELLIS (2024) separates where from what, and builds its latent by encoding DINOv2 features gathered from many rendered views of each training object, about 500K assets according to its paper, so one latent can be decoded to several formats.
Papers
- Structured 3D Latents for Scalable and Versatile 3D Generation TRELLIS: the structured latent on sparse voxels, the two rectified-flow stages and the Gaussian, radiance-field and mesh decoders.
- Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow Rectified flow: the straight path from noise to data and its velocity, which both stages learn.
- DINOv2: Learning Robust Visual Features without Supervision The self-supervised image encoder whose patch tokens condition both stages.
- Vision Transformers Need Registers The 4 register tokens of the DINOv2 model the page uses.
- 3D Gaussian Splatting for Real-Time Radiance Field Rendering Scenes as anisotropic 3D Gaussians rendered by projection and alpha blending, the output the Gaussian decoder writes.
- Mip-Splatting: Alias-free 3D Gaussian Splatting The anti-aliasing filters of TRELLIS's renderer, ported to PyTorch for the page.
- Submanifold Sparse Convolutional Networks Convolutions computed only at active sites, keeping the sparsity of stage 2's voxels.
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows Attention in local windows shifted every other block, which the Gaussian decoder applies in 3D.