Skip to main content
splax

splax

Differentiable 3D gaussian splatting for JAX, with rasterization kernels written in NVIDIA Warp.

Python License Ruff Ty Docs

splax renders and trains 3D gaussian splats inside JAX. Batched rendering and training run through jax.vmap, jax.grad, and jax.jit, with no system CUDA toolchain needed.

Installation

pip install splax

splax needs an NVIDIA GPU and requires CUDA-enabled JAX. No system CUDA toolchain is required.

Examples

Render a .ply scene from one camera.

import jax.numpy as jnp
import splax

splats = splax.io.load_ply("scene.ply")  # means, log_scales, quats, sh_colors, logit_opacities
img, _ = splax.render(
    *splats, viewmat=viewmat, background=jnp.ones(3), img_shape=(H, W), f=(fx, fy)
)  # (H, W, 3)

Batch over a stack of camera poses with jax.vmap, rendered in one go rather than in a Python loop.

import jax

frames = jax.vmap(
    lambda vm: splax.render(
        *splats, viewmat=vm, background=jnp.ones(3), img_shape=(H, W), f=(fx, fy)
    )[0]
)(viewmats)  # (B, H, W, 3)

Take gradients through the renderer with jax.grad. splax.render differentiates with respect to means, log scales, quats, SH colors, logit opacities, the camera pose, and per-object rigid transforms.

import jax


def loss(means, log_scales, quats, sh_colors, logit_opacities):
    img, _ = splax.render(
        means,
        log_scales,
        quats,
        sh_colors,
        logit_opacities,
        viewmat=viewmat,
        background=jnp.ones(3),
        img_shape=(H, W),
        f=(fx, fy),
    )
    return jnp.mean((img - target) ** 2)


grads = jax.grad(loss, argnums=(0, 1, 2, 3, 4))(*splats)

To edit .ply scenes, we recommend superspl.at.

Documentation

Full documentation lives at learnsyslab.github.io/splax: installation, a quickstart, a user guide for rendering, training, batching, and IO, and the API reference.

Why

Gaussian splatting lives mostly in PyTorch and hand-written CUDA. splax puts it inside JAX so splat rendering composes with jax.vmap, jax.grad, and jax.jit and drops into research pipelines that already run on JAX, without leaving the ecosystem for the render step.

Architecture

Splatting does not map onto XLA primitives, so projection, rasterization, and their backward passes are Warp kernels called from JAX. Rendering therefore composes with jax.vmap, jax.grad, and jax.jit, and a batch renders in one go rather than looping in Python.

Relation to jaxsplat

splax started from jaxsplat as the reference and parity baseline. The rasterizer was rewritten from CUDA to Warp to drop the system toolchain, then extended with the feature and performance work below.

Improvements

Ported from gsplat and the papers behind it, which inspired most of the performance work (credit per item).

  • Native multi-camera batched rendering (gsplat)
  • Opacity-aware tight tile intersection (StopThePop, Speedy-Splat, gsplat #927)
  • Packed 32-bit sort keys with quantized depth
  • Persistent sort and bin scratch across frames (gsplat caching allocator design)
  • Cooperative shared-memory tile blending with block-vote early exit (3DGS, gsplat)
  • Fixed-budget MCMC training with static shapes, relocation plus covariance noise (gsplat MCMCStrategy, Kheradmand et al. 2024)
  • Opacity and scale regularizers (gsplat mcmc preset)
  • Progressive resolution fine-tuning (coarse-to-fine, 3DGS)
  • Per-parameter Adam learning-rate schedules (gsplat, 3DGS)
  • L1 plus D-SSIM photometric loss (3DGS, gsplat, via dm-pix)
  • Camera pose gradients (gsplat projection backward)
  • Brown-Conrady lens distortion applied inside the projection
  • Batch-native backward passes under jax.vmap(jax.grad(render)) (gsplat)
  • Batched training steps with sqrt-batch learning-rate scaling (gsplat batch_size and steps_scaler)
  • View-dependent color from spherical harmonics up to degree 3 (3DGS, gsplat)
  • Anti-aliased opacity compensation (Mip-Splatting, gsplat), depth regularization from COLMAP points (gsplat depth_loss), per-image exposure correction (gsplat appearance optimization), all opt-in

Development

Developer setup with pixi, which installs splax editable with the dev tooling:

git clone https://github.com/learnsyslab/splax.git
cd splax
pixi shell

Run the test suite with pixi run -e tests tests. The suite also runs against any splax installation that includes the tests extra. Checking a built distribution before a release therefore is:

pixi run -e dist build
uv venv /tmp/splax-check
source /tmp/splax-check/bin/activate
uv pip install "dist/splax-0.1.0-py3-none-any.whl[tests]"
cd tests && pytest .

The gsplat reference tests JIT-compile a CUDA extension on first use, which needs a CUDA 12.8 compiler toolchain that pip cannot provide. Run the commands inside pixi shell -e tests to use the toolchain from the tests environment, or provide a system CUDA 12.8 install.

License

MIT (see LICENSE). gsplat-derived portions are under Apache-2.0 (licenses/Apache-2.0.txt).

Metadata

Release files for splax 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splax 0.2.3
File Size Uploaded Provenance Actions
splax-0.2.3.tar.gz 57.4 kB Without provenance Details for splax-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for splax 0.2.3
File Interpreter ABI Platform Actions
splax-0.2.3-py3-none-any.whl Python 3 none any Details for splax-0.2.3-py3-none-any.whl

Total release size: 115.2 kB

Release files / splax-0.2.3.tar.gz

Download URL splax-0.2.3.tar.gz
Size 57.4 kB
Tags Source
SHA-256 checksum
How to use checksums
61422e721feffc669d2e52b13fa0a8e079968f4894068931b8765c69f9a63c33
BLAKE2b-256 checksum
How to use checksums
32414d3a17de8e28a554b6a0b45ba6e72f11d1fec1636611e4d0f0f6b944668e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / splax-0.2.3-py3-none-any.whl

Download URL splax-0.2.3-py3-none-any.whl
Size 57.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a52321c194e42cf547b546030419ec113c49c9c59a6c7447080e87d386650036
BLAKE2b-256 checksum
How to use checksums
dbdf5daf3fad0ad0a85b98ba0bc6ae3f5e982718f3d058fe4473a694160052dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for splax 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page