{"id":23827,"library":"gsplat","title":"gsplat","description":"A Python package for differentiable rasterization of 3D Gaussians, widely used in 3D Gaussian Splatting (3DGS) research and applications. Version 1.5.3 includes support for batched scenes, 2DGS, distorted cameras, and CUDA fused Adam optimizer. Release cadence is approximately monthly.","status":"active","version":"1.5.3","language":"python","source_language":"en","source_url":"https://github.com/nerfstudio-project/gsplat","tags":["3D-gaussian-splatting","differentiable-rasterization","nerf","cuda"],"install":[{"cmd":"pip install gsplat","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"gsplat depends on PyTorch for tensor operations and CUDA support.","package":"torch","optional":false}],"imports":[{"note":"rasterization is a function, not a module; importing it as a module will raise AttributeError.","wrong":"from gsplat import rasterization","symbol":"rasterization","correct":"import gsplat; gsplat.rasterization(...)"},{"note":"DefaultStrategy is in gsplat.strategies, not top-level.","wrong":"from gsplat import DefaultStrategy","symbol":"DefaultStrategy","correct":"from gsplat.strategies import DefaultStrategy"}],"quickstart":{"code":"import torch\nimport gsplat\n\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n# dummy data: batch of 3D Gaussians (N, 14)\ngaussians = torch.randn(100, 14, device=device)\nviewmat = torch.eye(4, device=device).unsqueeze(0)  # (1, 4, 4)\nfx, fy, cx, cy = 100.0, 100.0, 50.0, 50.0\nimg_height, img_width = 100, 100\nrendered = gsplat.rasterization(\n    means=gaussians[:, :3],\n    quats=gaussians[:, 3:7],\n    scales=torch.exp(gaussians[:, 7:10]),\n    opacities=torch.sigmoid(gaussians[:, 10:11]),\n    colors=torch.sigmoid(gaussians[:, 11:14]),\n    viewmat=viewmat,\n    K=torch.tensor([[fx, 0, cx], [0, fy, cy], [0, 0, 1]], device=device),\n    width=img_width,\n    height=img_height,\n)\nprint(rendered.keys())","lang":"python","description":"Minimal example of rasterization with dummy data. Requires CUDA for performance."},"warnings":[{"fix":"Update calls to pass separate keyword arguments. See docs for current signature.","message":"In v1.0+, the rasterization function signature changed: now expects individual tensors for means, quats, scales, opacities, colors instead of a single packed tensor.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Use 'gsplat.rasterization' directly instead of 'gsplat.cuda_legacy.rasterization'.","message":"The 'gsplat.cuda_legacy' module is deprecated and will be removed in a future release.","severity":"deprecated","affected_versions":">=1.3.0"},{"fix":"Ensure you have a GPU and install PyTorch with CUDA support (e.g., 'pip install torch==2.2.0+cu118 -f https://download.pytorch.org/whl/torch_stable.html').","message":"gsplat requires a CUDA-capable GPU and PyTorch with CUDA. Running on CPU will trigger a RuntimeError about CUDA not being available.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'import gsplat' then call 'gsplat.rasterization(...)'.","cause":"Importing 'gsplat.rasterization' as a module instead of calling it as a function after importing the package.","error":"module 'gsplat' has no attribute 'rasterization'"},{"fix":"Install gsplat from source to compile for your specific GPU: 'pip install gsplat --no-binary gsplat'.","cause":"The installed gsplat wheel does not support the GPU architecture (e.g., CUDA compute capability mismatch).","error":"RuntimeError: CUDA error: no kernel image is available for execution on the device"},{"fix":"Ensure at least one Gaussian is provided, or handle the edge case by skipping rasterization when count is zero.","cause":"Passing an empty tensor for means when no Gaussians are present.","error":"AssertionError: Total number of Gaussians must be non-negative"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}