Skip to main content

3D generation model

Self-host TRELLIS.2-4B: one image to a PBR-ready GLB, starting at 24GB of VRAM

Microsoft Research's structured-3D-latent line is on its second generation. Here are the real VRAM numbers, quantised footprints, per-stage weights and the things that actually bite you — then the exact card to rent.

TRELLIS is Microsoft Research's structured 3D latent generator. The first paper, "Structured 3D Latents for Scalable and Versatile 3D Generation" (arXiv 2412.01506), was a CVPR'25 Spotlight, and microsoft/TRELLIS has picked up over thirteen thousand stars. The thing to notice is that the main line has already moved on. The current flagship is microsoft/TRELLIS.2-4B, from "Native and Compact Structured Latents for 3D Generation" (arXiv 2512.14692), living in a separate microsoft/TRELLIS.2 repository; both generations pull millions of Hugging Face downloads a month. If the tutorial you found still talks about TRELLIS-image-large and SLat, you are reading about the previous generation.

TRELLIS.2 replaced the geometry representation outright. Generation one reconstructed meshes through SLat plus iso-surface fields such as Flexicubes. Generation two uses O-Voxel, a field-free sparse voxel structure that needs no SDF, which is why it can represent open surfaces, non-manifold geometry and enclosed internal structure — and it encodes geometry and appearance together, so it emits GLB with full PBR attributes: base color, roughness, metallic, opacity. The 4B flow-matching transformer is really five 1.3B DiT stages: ss_flow lays down sparse structure at 64³, img2shape runs at 512 and 1024, imgshape2tex produces materials at 512 and 1024, backed by shape and texture sparse 3D VAEs (708MB per encoder, 948MB per decoder). The VAE does 16× spatial downsampling, compressing a 1024³ asset into roughly 9.6K latent tokens. Image conditioning comes from DINOv3 ViT-L/16; background removal is BiRefNet. Published H100 timings: about 3 seconds at 512³ (2s shape + 1s materials), about 17 seconds at 1024³ (10 + 7), about 60 seconds at 1536³ (35 + 25).

Self-hosting this is an environment problem far more than a model problem. Both READMEs say Linux only. TRELLIS.2 defaults to CUDA 12.4 and PyTorch 2.6.0, and setup.sh compiles six extensions in a row — flash-attn, nvdiffrast, nvdiffrec, cumesh, o-voxel, flexgemm — with Blackwell cards needing their own treatment (repo issue #143 is a working RTX 5090 + WSL-Ubuntu recipe). Multi-GPU training is still rough: issues #90 and #95 are both flex_gemm illegal-memory-access crashes. The VRAM line is blunt: 24GB minimum, verified only on A100 and H100, with the bf16 weights alone taking 16.2GB and the rest going to activations and sparse voxels. To fit a 16GB card you go GGUF or FP8. Rather than reinstalling CUDA on your workstation for an evening, rent the right card by the second on NexGPU: 2,000+ prebuilt images including PyTorch and ComfyUI, and compute billing stops the moment you stop the instance.

01 —

Variants and quantised builds

Per-stage weights are listed here — do not size your GPU from the phrase "4B model".

VersionParametersVRAMContextNotes
TRELLIS.2-4B (official bf16)4B = 5 × 1.3B DiT + sparse 3D VAE16.2GB of weights / official floor ≥24GB VRAM512³ / 1024³ / 1536³ voxel resolutionThe current main line. Single image in, PBR GLB out with base color, roughness, metallic and opacity, plus an MP4 preview. Microsoft verified it on A100 and H100 only.
TRELLIS.2-4B FP8 / INT8 (ComfyUI route)about 1.29GB per DiT stage at FP8Comfy-Org merged weights: 10.34GB bf16, 5.25GB int8, plus 1.10GB shape VAE, 948MB texture VAE and 1.21GB DINOv3 ViT-L512³ / 1024³ComfyUI-Trellis2 ships 30+ nodes, switchable sdpa and flash_attn_3 backends, and Windows wheels across Torch 2.7/2.8/2.10 and Python 3.11/3.13. Far more comfortable at 1024³ on a 24GB card than official bf16.
TRELLIS.2-4B GGUF quantsper 1.3B DiT stage: Q8_0 ~1.43GB, Q6_K ~1.12GB, Q5_K_M ~948MB, Q4_K_M ~789MBfull q8 set ~10GB, q4 set ~6.5GB; trellis.cpp states the 1024³ cascade fits a 16GB card512³ / 1024³ cascadePairs with trellis.cpp (CUDA / Vulkan / ROCm, with a resident HTTP server) or ComfyUI GGUF nodes. You pay in time: its published res-1024, 12-step benchmark runs 3:16 to 7:23 end to end on an RTX 5060 Ti.
TRELLIS-image-large (gen one)1.2Bofficial floor ≥16GB VRAM64³ sparse structure + SLat, multi-image conditioning supportedThe previous image line, still maintained. Outputs 3D Gaussians, radiance fields and meshes, exporting GLB and PLY. Still the better choice when you want 3DGS assets rather than a PBR mesh.
TRELLIS-text-xlarge2.0Bofficial floor ≥16GB VRAMtext prompt → 64³ sparse structureLargest of the text-conditioned models. Microsoft says outright that data limitations make the text models less creative and less detailed than the image-conditioned ones — get the image path working first.
TRELLIS-text-base / TRELLIS-text-large342M / 1.1Bofficial floor ≥16GB VRAMtext prompt → 3DLightweight text line, useful for bulk blockouts and style tests. Training code and the TRELLIS-500K dataset (curated from Objaverse(XL), ABO, 3D-FUTURE, HSSD and Toys4k by aesthetic score) are both public.

02 —

Which card to rent

Size against the 24GB floor — do not point a 16GB card at the official bf16 pipeline.

  • Evaluating gen-one TRELLIS-image-large or producing 3D Gaussian assets

    Tesla V100 32GB$0.188/GPU-hr

    The official README calls out V100 specifically as lacking flash-attn support and hands you the fix — ATTN_BACKEND=xformers. 32GB is generous against the 16GB floor, and this is the cheapest card on the network.

  • TRELLIS.2-4B official bf16 pipeline, single-image generation at 512³

    RTX 3090 24GB$0.193/GPU-hr

    Exactly clears the official 24GB minimum, Ampere runs flash-attn without heroics, and 16.2GB of weights plus activations fit. The cheapest honest way to find out whether the stack runs at all.

  • 1024³ cascade with the PBR texturing pipeline back to back, or long batch runs

    RTX 5090 32GB$0.723/GPU-hr

    24GB gets tight when the shape and texture 1.3B DiT stages are both resident; 32GB leaves headroom. Blackwell needs a self-compiled flash-attn — repo issue #143 has a working 5090 + WSL-Ubuntu recipe to copy.

  • 1536³ high-detail assets, production asset pipelines, or fine-tuning

    A100 PCIE 80GB$0.824/GPU-hr

    This is the hardware Microsoft actually verified on. 80GB holds all five DiT stages plus both VAEs at once, so 1536³ never swaps weights. Scale out from there — NexGPU nodes go up to 14 GPUs and 2,152GB of VRAM.

03 —

Four steps to your first GLB

The official stack is Linux + CUDA 12.4 + PyTorch 2.6.0. Follow it; do not improvise versions.

  1. 01

    Start an instance with 24GB or more and a PyTorch image

    Pick a card in the NexGPU console (RTX 3090 24GB and up), choose a PyTorch image from the 2,000+ prebuilt library, and connect over SSH, Jupyter or the web terminal. First thing: confirm the driver and CUDA version line up — TRELLIS.2's compile steps are sensitive to this.

    nvidia-smi && python -c "import torch; print(torch.__version__, torch.version.cuda)"
  2. 02

    Clone the repo and build the six extensions

    setup.sh creates the trellis2 environment and compiles flash-attn, nvdiffrast, nvdiffrec, cumesh, o-voxel and flexgemm in sequence. This is the slowest step and the one that kills most local installs. Keep --recursive: one missing submodule and the build fails.

    git clone -b main https://github.com/microsoft/TRELLIS.2.git --recursive && cd TRELLIS.2 && . ./setup.sh --new-env --basic --flash-attn --nvdiffrast --nvdiffrec --cumesh --o-voxel --flexgemm
  3. 03

    Pull the weights and run inference

    from_pretrained fetches 16.2GB from microsoft/TRELLIS.2-4B: five 1.3B DiT stages plus the shape and texture VAEs. Get 512³ working first (about 3 seconds on an H100), then climb to 1024³ and 1536³. PBR texturing runs as its own pipeline — see example_texturing.py.

    from trellis2.pipelines import Trellis2ImageTo3DPipeline
    pipeline = Trellis2ImageTo3DPipeline.from_pretrained("microsoft/TRELLIS.2-4B")
    mesh = pipeline.run(image)[0]
  4. 04

    Launch the Gradio demo, or drop to a quantised build

    python app.py brings up the official web demo; app_texturing.py is the texturing variant. On a 16GB card, switch to GGUF instead: the ilintar/trellis2-gguf q4 set is about 6.5GB and q8 about 10GB, driven by trellis.cpp with --res 512|1024|1536, which can also stay resident as an HTTP service for your backend to call.

    python app.py

What a 3D asset actually costs

Work it out from the published H100 timings. A 1024³ generation takes about 17 seconds (10s shape + 7s materials). NexGPU's H100 SXM 80GB is $3.582/GPU-hr, so 3600 ÷ 17 ≈ 211 assets per hour, about $0.017 each. At 1536³ it is roughly 60 seconds, 60 assets an hour, about $0.060 each. If you are only validating quality and tuning input images, an RTX 3090 24GB at $0.193/GPU-hr running flat out for a full day is 0.193 × 24 = $4.63. Storage is separate: 16.2GB of weights at the $0.414/GB-month median is 16.2 × 0.414 ≈ $6.71/month, roughly $0.22 a day; exporting 1,000 GLB files of 5MB each is 5GB of egress, 5 × $0.0081 ≈ $0.04, effectively nothing. Billing is metered per second and priced per hour, with no minimum, no setup fee and no quota request. Compute billing stops when the instance stops; storage keeps billing until it is destroyed.

04 —

FAQ

How much VRAM does TRELLIS need? Is 24GB enough?

TRELLIS.2-4B states a 24GB minimum and was verified only on A100 and H100. The bf16 weights alone are 16.2GB (five 1.3B DiT stages plus the shape and texture VAEs), leaving the rest for activations and sparse voxels — so 512³ is comfortable on 24GB, while the 1024³ cascade gets tight once shape and texture stages are both resident. Gen-one TRELLIS-image-large only asks for 16GB. This is not worth guessing about: measure it on a NexGPU RTX 3090 24GB at $0.193/GPU-hr, and if it does not fit, move to an RTX 5090 32GB at $0.723 or an A100 PCIE 80GB at $0.824. Per-second billing means switching cards costs you minutes, not money.

What is the difference between TRELLIS and TRELLIS.2, and which should I use?

This is not a point release — the geometry representation changed. Gen one (arXiv 2412.01506) used the SLat structured latent space at 1.2B and output 3D Gaussians, radiance fields and meshes. TRELLIS.2 (arXiv 2512.14692) moved to O-Voxel, dropping iso-surface fields like SDF and Flexicubes entirely, which lets it represent open surfaces, non-manifold geometry and internal structure at 4B parameters and up to 1536³, emitting PBR-ready GLB directly. Start new work on TRELLIS.2. Two reasons to go back to gen one: you want 3DGS assets, or you need text conditioning (TRELLIS.2 takes a single image). Either line is one instance and one setup.sh away on NexGPU.

Can a 16GB GPU run TRELLIS.2? Are there quantised builds?

Not on the official PyTorch pipeline, but the quant ecosystem is mature. Per 1.3B DiT stage: Q4_K_M around 789MB, Q5_K_M around 948MB, Q6_K around 1.12GB, Q8_0 around 1.43GB, FP8 around 1.29GB. The ilintar/trellis2-gguf q4 set totals about 6.5GB and q8 about 10GB, and trellis.cpp (CUDA, Vulkan and ROCm backends) documents the 1024³ cascade fitting a 16GB card via FlashAttention with padded K/V. The cost is wall clock: its published res-1024, 12-step benchmark runs 3:16 for light input and 7:23 for heavy input on an RTX 5060 Ti, load time included. Test the quantised route on a NexGPU Tesla T4 16GB at $0.298/GPU-hr, or skip the compromise and run full weights on an RTX 4090 24GB at $0.540/GPU-hr.

Does TRELLIS run on Windows?

Both READMEs say Linux only. Three routes actually work on Windows: WSL2 (repo issue #143 documents a complete RTX 5090 32GB + WSL-Ubuntu setup including a compiled flash-attn), ComfyUI-Trellis2 (Windows wheels across Torch 2.7/2.8/2.10 and Python 3.11/3.13, plus a blackwell_fix.py), and prebuilt trellis.cpp binaries. All three involve a fight with your build environment. Price your own hours honestly and a clean Linux instance on NexGPU usually comes out cheaper than an evening of toolchain archaeology.

What licence is TRELLIS under, and can I use the output commercially?

Both TRELLIS and TRELLIS.2 release model weights and the bulk of the code under MIT, which is unusually permissive for 3D generation — plenty of comparable projects are research-only. But both READMEs flag that submodules carry their own terms: TRELLIS.2 depends on nvdiffrast and nvdiffrec, gen one on diffoctreerast and a modified Flexicubes, and those rendering components need reviewing individually. TRELLIS-500K training data comes from Objaverse(XL), ABO, 3D-FUTURE, HSSD and Toys4k, which is worth its own assessment before commercial use. This is exactly why self-hosting matters: run it on a NexGPU instance and your input images and generated GLB files stay on your machine, never touching a third-party API.

My generated mesh has small holes and broken faces — what now?

Microsoft documents this in the model card: raw meshes may contain small holes or minor topological discontinuities and need post-processing. Three practical moves: raise the resolution (512³ → 1024³ → 1536³ improves things noticeably), run the cumesh and o-voxel postprocess passes for hole filling and decimation, then finish in Blender or your DCC of choice. The other common trap is on the input side — the pipeline ships BiRefNet (that 882MB model) for background removal, and any background it misses grows into the geometry. Microsoft also notes this is an unaligned base model, so expect to iterate on inputs. Iteration costs time rather than VRAM, and since NexGPU meters per second and stops billing compute the moment you stop the instance, a round of experiments bills out at pocket change.

Start building on NexGPU

Enterprise R&D team or solo developer — either way, your first job can be running in minutes.

Sign up to browse live network pricing. No payment method required.