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("batteryphil/TripoSG-PRIME-Quant", dtype=torch.bfloat16, device_map="cuda")

prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]

TripoSG (1.5B 3D Flow DiT + DINOv2-Large) β€” PRIME-Quant (100% V3_P4_0)

A 100% 4-bit Prime-Harmonic (V3_P4_0) quantization of VAST-AI/TripoSG (1.5B 3D Rectified-Flow DiT + DINOv2-Large image encoder, upstream MIT license) built with PRIME-Quant (@batteryphil).

Compresses the 6.98 GB FP32 (3.49 GB BF16) DINOv2-Large + 1.5B 3D DiT weights down to 0.98 GB on disk (7.1Γ— vs FP32 / 3.55Γ— vs BF16) β€” running 100% GPU-resident in 1.48 GB VRAM (2.66 GB peak including 256Β³ SDF marching cubes) on 4 GB+ AMD ROCm or NVIDIA CUDA GPUs, with zero CUDA-only extensions (diso/spconv/nvdiffrast not required).


Verified Benchmark Results (AMD RX 9060 XT 16 GB, ROCm 7.2)

All measurements freshly executed end-to-end (FLUX.1-schnell PRIME-Quant β†’ TripoSG 3D .glb, 30 steps, CFG 7.0, 256Β³ hierarchical marching cubes, benchmarks/triposg_bf16_vs_prime_benchmark.json):

Metric BF16 Teacher PRIME-Quant (100% V3_P4_0, Zero CPU Offload)
Disk Weights (DINOv2 + 1.5B DiT) 6.98 GB FP32 / 3.49 GB BF16 0.98 GB (174.7 MB DINOv2 + 810.8 MB DiT β€” 7.1Γ— / 3.55Γ—)
Quantized Linear Coverage 0 / 368 368 / 368 (100% V3_P4_0)
Total GPU-Resident VRAM (incl. SDF VAE) 3,865.3 MB 1,478.7 MB (1.48 GB)
Peak PyTorch VRAM (256Β³ SDF Decode) 5,047.8 MB 2,661.4 MB (2.66 GB) (fits 4 GB GPUs!)
Mean Time / Watertight 3D .glb Mesh 18.72 s 18.96 s (~1.0Γ— parity)

Per-Asset 3D Geometry Parity (20,000 Sampled Surface Points vs. BF16 Teacher)

3D Asset (Input from FLUX.1-schnell PRIME-Quant) Chamfer-L1 F-Score @0.02 F-Score @0.05 Normal Consistency Watertight
01_knight_helmet (268K verts / 536K faces) 0.00869 92.35% 99.28% 0.8334 Yes
02_scifi_mech (302K verts / 605K faces) 0.01235 86.66% 100.00% 0.7798 Yes
03_treasure_chest (145K verts / 290K faces)* 0.04488* 27.45%* 57.02%* 0.7026 Yes

*On 03_treasure_chest, BF16 extruded a stray floor-shadow skirt beside the base whereas PRIME-Quant produced a cleaner shadow-free chest β€” shifting raw Chamfer distance against BF16's stray geometry.

Visual 4-View Studio Clay Parity (Top = BF16 Teacher, Bottom = 100% PRIME-Quant V3_P4_0)

TripoSG Knight Helmet BF16 vs PRIME-Quant TripoSG Sci-Fi Mech BF16 vs PRIME-Quant TripoSG Treasure Chest BF16 vs PRIME-Quant

(Full watertight .glb pairs for all assets are included in benchmarks/.)


Quantization Architecture Highlights

  1. Exact Interleaved-QKV/KV H_128 Walsh-Hadamard Rotation: TripoSGAttnProcessor2_0 packs Q/K/V interleaved per head across to_q/to_k/to_v. Rotating the true per-head V slices against to_out.0 achieves 52.5 dB verified BF16 invariance (22.55 dB mean / 21.44 dB floor across all 21 DiT blocks).
  2. DINOv2-Large Exact H_64 Rotation: Verified 67.1 dB BF16 invariance (174.7 MB, 0.9849 end-to-end embedding cosine similarity vs. BF16).
  3. 4,096-Timestep time_proj PRIMAL: Calibrated across [0, 1000] to 55.17 dB validation SNR.
  4. Pure-PyTorch ROCm & diffusers>=0.38 Ready: Bundled patched triposg/ replaces CUDA-only diso with skimage.measure.marching_cubes and adds torch.nn.LayerNorm compatibility.

Quickstart (Standalone β€” Zero Extra Repos or C++ Compiles Required)

pip install -r requirements.txt

TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 \
python run_triposg_prime.py \
    --image benchmarks/01_knight_helmet_input.png \
    --steps 30 --octree-depth 8 --seed 101 \
    --output knight_helmet_prime.glb

Licensing & Attribution

  • PRIME-Quant checkpoints & standalone runtime (prime_infer_runtime.py, run_triposg_prime.py): Copyright (c) 2026 Philip Bartsch (@batteryphil), licensed under the Bartsch Personal-Free & 5% Commercial Profit-Share License v1.0 (free for personal, research, academic, and non-profit use).
  • Upstream Base Model & Bundled triposg/ Pipeline (VAST-AI/TripoSG): MIT License by VAST-AI Research β€” see NOTICE.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for batteryphil/TripoSG-PRIME-Quant

Base model

VAST-AI/TripoSG
Quantized
(5)
this model