Skip to content

About

Resources

Stars

22 stars

Watchers

0 watching

Forks

Repository files navigation

GaussianDiT: 3D Gaussian Scene Generation with Spatial Latent Diffusion

Runyi Yang1, Mengjiao Ma1, Letian Shi1, Deheng Zhang1, Kanzhi Wu2, Lei Sun1, Luc Van Gool1, Ajad Chhatkuli1,†, Danda Pani Paudel1,†
1INSAIT, Institute for Computer Science, Artificial Intelligence and Technology    2vivo Mobile Communication Co., Ltd.
†Equal supervision

A whole indoor 3DGS scene in about 2 seconds on one GPU, 458× faster than autoregressive GaussianGPT

Indoor scenes generated from noise by GaussianDiT-B

2026-12-01. Paper on arXiv. Code released: training, data preparation, sampling and the paper's evaluation. The pretrained GaussianVAE, GaussianDiT-B and GaussianDiT-L weights are coming soon (by the end of December 2026).

TL;DR. GaussianDiT encodes a whole indoor 3DGS scene into a compact spatial latent grid and generates that grid with a single flow Transformer. The same model also completes partial scenes and edits existing ones.

Overview

GaussianDiT overview: GaussianVAE, GaussianDiT, generation, completion, editing and speed
  • GaussianVAE encodes a 3DGS scene into one 512-d latent per 32 cm cell. The encoder builds on the Chorus 3DGS foundation model (PTv3). The hierarchical decoder predicts 8 cm and 4 cm occupancy and then up to 16 Gaussians per 4 cm cell, so each region gets as many primitives as its content needs.
  • GaussianDiT is a flow-matching Transformer over the latents of a whole scene. One token is a 64 cm block of 2 × 2 × 2 cells (8 × 512 latent dims + 8 presence flags). The same network does unconditional generation and scene completion: known tokens are held fixed during sampling.

This repository contains the code to train both models, encode and pack the data, sample scenes, and reproduce the paper's evaluation. The settings of the internal ablations are not part of it.

1. Installation: Setup the environment

Prerequisites

You need Linux x86_64 and an NVIDIA GPU with compute capability ≥ 8.0 (Ampere or newer), because FlashAttention-2 and bf16 autocast are used throughout. The code has been tested with PyTorch 2.5.1 and CUDA 12.1 on A100, RTX A6000, H100 / H200 and RTX PRO 6000 Blackwell. INSTALL.md has the full guide, including a setup without conda and notes for Blackwell GPUs.

Create environment

We recommend conda. environment.yml installs Python 3.10, the CUDA compiler for gsplat's build, PyTorch and every pinned package (flash-attn 2.7.4, spconv 2.3.8, torch-scatter, gsplat 1.5.3).

conda env create -f environment.yml
conda activate gaussiandit

Installation

GaussianVAE builds on Chorus, which is used from a checkout at commit ba0cee2c. gsplat compiles its CUDA kernels on first use.

git clone https://github.com/GaussianWorld/Chorus.git && git -C Chorus checkout ba0cee2cd18a9cd847fd2de4e609b74e09d11b5d
export PYTHONPATH=$PWD/Chorus:$PYTHONPATH
pip install -e .

2. Data Preparation

All paper numbers use the split full_A: 6,367 train / 13 val / 934 test scenes (7,314 in total) from ARKitScenes, Hypersim, InteriorGS, Matterport3D, Replica, ScanNet and ScanNet++. The lists are in assets/splits/full_A. DATA.md describes every stage:

# Stage Command Output Size
0 Source 3DGS scenes download (DATA.md §1) one PLY per scene 2.0 TB
1 Tiled Gaussian store scripts/data/convert_scenes.py data/store/<source_id>/ 524 GB
2 Unit manifests scripts/data/build_manifests.py data/manifests/{train,val,test}.jsonl 12 MB
3 VAE latents scripts/export_latents.py data/latents/<split>/<source_id>.npz 185 GB
4 DiT token stores scripts/prepare_dit_data.py data/latents/packed/<split>/ 183 GB

After all stages the data folder should look like this:

.(data)
├── store                            # tiled Gaussian store, one folder per scene
│   └── <source_id>
├── manifests                        # training / evaluation units
│   ├── train.jsonl
│   ├── val.jsonl
│   └── test.jsonl
└── latents                          # VAE latents, written by the frozen GaussianVAE
    ├── train
    │   └── <source_id>.npz
    ├── val
    ├── test
    └── packed                       # memory-mapped token stores for the DiT
        ├── train
        ├── val
        └── test

Stages 1, 2 and 4 run on CPU and resume where they stopped; stage 3 needs GPUs and the trained VAE. To train only the DiT, start from the packed latents and skip stages 0–3.

3. Pretrained Models

Coming soon (by the end of December 2026). The weights will be released on the Hugging Face Hub under the repo ids below. Each repo holds config.json and model.safetensors (EMA weights), and the scripts take the same repo ids. A DiT repo names its VAE in config.json, so the pipeline loads both from one id.

Model Architecture Parameters Updates Test results (paper) Hugging Face
GaussianVAE hierarchical VAE, incl. the fine-tuned Chorus backbone 250M 350K PSNR 19.55, CD ×10³ 0.39 GaussianDiT/GaussianVAE (coming soon)
GaussianDiT-B width 1024, depth 16 + latent normalisation 314M 220K COV-CD 64.1%, completion PSNR 14.87 GaussianDiT/GaussianDiT-B (coming soon)
GaussianDiT-L width 1280, depth 20 + latent normalisation 606M 200K – GaussianDiT/GaussianDiT-L (coming soon)

To load the parts separately:

from gaussiandit.dit.model import GaussianDiT
from gaussiandit.vae.model import DenseVAE

dit = GaussianDiT.from_pretrained("GaussianDiT/GaussianDiT-B")
vae = DenseVAE.from_pretrained("GaussianDiT/GaussianVAE")

To train a VAE from scratch you also need the pretrained Chorus weights, lang-dino-enc-pretrain-scan-ppv2-mp3d-mcmc.pth. They are on Hugging Face at SceneSplatPro/Chorus; access must be requested.

4. Generate Scenes

from gaussiandit import GaussianDiTPipeline

pipe = GaussianDiTPipeline.from_pretrained("GaussianDiT/GaussianDiT-B", device="cuda")
scene = pipe(size=(6.4, 4.8, 2.88), seed=0)     # a 6.4 m x 4.8 m room, 2.88 m high (about 1-2 s on an H200)
pipe.save_ply(scene, "scene.ply")               # standard 3DGS PLY

or from the command line:

# unconditional, four seeds -> samples/*.ply
python scripts/sample.py --model GaussianDiT/GaussianDiT-B --size 6.4 4.8 2.88 --seeds 0 1 2 3 --out samples/

# completion: keep one half of a test scene and generate the rest (needs the packed latents)
python scripts/sample.py --model GaussianDiT/GaussianDiT-B --packed data/latents/packed/test --index 12 \
    --context half --out samples/

The PLY files open in any 3DGS viewer. Coordinates are in metres with z up. They have degree-0 colour only, because the VAE models view-independent colour.

5. Training from Scratch

The paper's recipe is below. GPU-hours are converted to H200 equivalents. All trainers resume from <run>/latest.json when you rerun the same command. On SIGUSR1 / SIGTERM they checkpoint and exit. scripts/slurm/ has example Slurm launchers.

GaussianVAE

350K updates on 4 GPUs (one scene unit per GPU per update), about 640 H200 GPU-hours. AdamW: lr 2e-4, betas (0.9, 0.999), weight decay 0.01, EMA 0.999.

Phase Updates Chorus backbone Learning rate
A 0–20K frozen 1K-update warmup
B 20K–290K fine-tuned at 0.1× lr 2K-update warmup for Chorus
C 290K–350K fine-tuned every learning rate ×0.1

Within these phases:

  • the posterior noise ramps up from 2K to 20K updates;
  • latent masking ramps up from 20K to 25K;
  • the first 100K updates supervise 3D structure and Gaussian parameters only, then the render loss ramps in.
torchrun --nproc_per_node 4 scripts/train_vae.py --config configs/vae/gaussiandit_vae.json --out runs/vae \
    --chorus-checkpoint checkpoints/chorus/lang-dino-enc-pretrain-scan-ppv2-mp3d-mcmc.pth
python scripts/export_pretrained.py vae --ckpt runs/vae/checkpoints/full_0350000.pt --out hf/GaussianVAE

Latents

Encode every scene with the frozen VAE, then pack the latents into memory-mapped token stores. The latents take about 185 GB.

torchrun --nproc_per_node 8 scripts/export_latents.py --vae GaussianDiT/GaussianVAE \
    --manifest data/manifests/train.jsonl,data/manifests/val.jsonl,data/manifests/test.jsonl \
    --splits train,val,test --out data/latents
python scripts/prepare_dit_data.py --latents data/latents --splits train,val,test

GaussianDiT

220K updates. Each update is 8 GPUs × 20,480 tokens, packed from scene crops of up to 4,096 tokens. AdamW: lr 2e-4, betas (0.9, 0.95), no weight decay, 2K-update warmup then constant, EMA 0.9999. GaussianDiT-B takes about 150 H200 GPU-hours. With fewer GPUs, set data.accum so that GPUs × accum = 8; the GaussianDiT-L config uses 4 GPUs × accum 2.

torchrun --nproc_per_node 8 scripts/train_dit.py --config configs/dit/gaussiandit_b.json --out runs/dit_b
python scripts/export_pretrained.py dit --ckpt runs/dit_b/checkpoints/step_0220000.pt --vae GaussianDiT/GaussianVAE \
    --out hf/GaussianDiT-B

6. Evaluation

Results (paper, 934 / 64 test scenes)

Reconstruction PSNR ↑ SSIM ↑ LPIPS ↓ CD ×10³ ↓
GaussianGPT (VQ-VAE) 16.86 0.562 0.481 13.85
GaussianVAE 19.55 0.635 0.452 0.39
Unconditional generation FID ↓ KID ×10³ ↓ COV-CD % ↑ MMD-CD ×10³ ↓
GaussianGPT 188.3 91.9 40.6 1926
GaussianDiT-B 187.9 99.4 64.1 1104
Scene completion (half scene known) FID ↓ KID ×10³ ↓ PSNR ↑ SSIM ↑ LPIPS ↓ CD ×10³ ↓
GaussianGPT 182.2 94.0 11.97 0.396 0.654 5737
GaussianDiT-B 154.0 64.7 14.87 0.540 0.579 163

Generation takes 2.1 s per scene on one H200 (GaussianGPT: 952 s unconditional, 340 s completion). FID and KID use torchvision's Inception-v3, so they are comparable within this protocol only.

Reconstruction

Whole-scene decodes of the 934 test scenes. Each scene is rendered at its 8 fixed eye-height views (assets/view_cache) against the source Gaussians; CD is the Chamfer distance between Gaussian centres.

torchrun --nproc_per_node 8 scripts/eval_vae.py reconstruct --vae GaussianDiT/GaussianVAE \
    --manifest data/manifests/test.jsonl --out eval/vae_test
python scripts/eval_vae.py score --pred eval/vae_test --store data/store --split test --out eval/vae_scores
python scripts/eval_vae.py aggregate --split test --out eval/vae_scores

Generation

64 test crops (assets/generation_eval/templates_test64.json). The reference is the source Gaussians of each crop.

  • Unconditional: FID / KID / IS of views chosen on each scene's own Gaussians, plus COV / MMD of squared Chamfer distances between Gaussian-centre clouds.
  • Completion: the generated scene and the reference are rendered at the reference's own cameras.
python scripts/eval_generation.py reference --store data/store --out eval/gen_ref
torchrun --nproc_per_node 8 scripts/eval_generation.py generate --model GaussianDiT/GaussianDiT-B \
    --packed data/latents/packed/test --context none --out eval/gen_none
python scripts/eval_generation.py score --gen eval/gen_none --ref eval/gen_ref --out eval/gen_none.json
torchrun --nproc_per_node 8 scripts/eval_generation.py generate ... --context half --out eval/gen_half
python scripts/eval_generation.py paired --scenes eval/gen_half/scenes --ref eval/gen_ref --store data/store \
    --out eval/gen_half_paired.json

Notes on reproducing the paper

  • VAE training history. The released VAE was trained as one continuous run of 350K updates, but some settings were switched on partway:

    From update Change
    7.8K structure stage lengthened from 10K to 100K updates
    20K latent masking on
    58.6K full Gaussian-attribute supervision during the structure stage
    164K 16 instead of 4 rendered regions per visit, regions weighted by size, cell budget 20,480 instead of 32,768
    164K training data: the full_A train split (6,367 scenes) instead of the 5,832 scenes before; the extra 535 were former validation scenes

    configs/vae/gaussiandit_vae.json uses the final value of every setting from update 0. Learning rates, the schedule and every other setting match the run.

  • Determinism and variance. Encoding is not bit-for-bit deterministic on GPU, because the sparse convolutions and scatter operations of the encoder use atomics; expect run-to-run differences of about ±0.05 dB per scene in reconstruction. Sampling is deterministic for a fixed seed on a given GPU type, but different GPU types give different samples. With 64 scenes, unconditional FID / KID vary noticeably between sample draws: three draws on H200 (--seed-offset 0 / 1000 / 2000) gave FID 194.6 / 194.9 / 182.7 and KID ×10³ 115.5 / 119.1 / 94.4 for GaussianDiT-B. Completion metrics are stable: H200 gives FID 154.5 and PSNR 14.97, against 154.0 and 14.87 in the paper.

Repository Layout

src/gaussiandit/
  data/        store.py (tiled Gaussian store), sources.py + interiorgs.py (readers), units.py (units, manifests)
  vae/         model.py (GaussianVAE), chorus.py (backbone), attention.py, visit.py (training visits),
               loss.py (objective), render.py (gsplat), codec.py (encode / decode scenes), evaluate.py, trainer.py
  dit/         model.py (GaussianDiT, flow loss, sampler), tokens.py (latents -> tokens), trainer.py, sampling.py
  pipeline.py    GaussianDiTPipeline (DiT + VAE from the Hub, scenes in one call)
  hub.py         from_pretrained / save_pretrained (config.json + model.safetensors, local or Hugging Face Hub)
  evaluation.py  FID / KID / IS, COV / MMD, Chamfer, ground-truth loading
scripts/       data/convert_scenes.py, data/build_manifests.py, train_vae.py, export_latents.py,
               prepare_dit_data.py, train_dit.py, sample.py, eval_vae.py, eval_generation.py, export_pretrained.py
configs/       vae/gaussiandit_vae.json, dit/gaussiandit_{b,l}.json
assets/        splits/full_A (scene lists), view_cache (evaluation cameras), generation_eval (64 templates, cameras),
               media (README figures)

Citation

If you find this code useful for your research, please consider citing:

@article{yang2026gaussiandit,
  title   = {GaussianDiT: 3D Gaussian Scene Generation with Spatial Latent Diffusion},
  author  = {Yang, Runyi and Ma, Mengjiao and Shi, Letian and Zhang, Deheng and Wu, Kanzhi and Sun, Lei and Van Gool, Luc and Chhatkuli, Ajad and Paudel, Danda Pani},
  journal = {arXiv preprint arXiv:2612.02454},
  year    = {2026}
}

Acknowledgement

We thank the authors of Chorus, SceneSplat, SceneSplat++, GaussianGPT and GaussianVLM for releasing their code, models and data. This code builds on Chorus (point encoder), gsplat (rasterization) and FlashAttention. The training scenes are 3DGS reconstructions from SceneSplat-7K (ARKitScenes, Hypersim, Matterport3D, Replica, ScanNet, ScanNet++) and InteriorGS. Please follow the license of each source dataset.

License

MIT (see LICENSE). The datasets and the Chorus weights have their own terms.

About

Resources

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages