NeRF, rewritten in PyTorch, runs 1.3× faster
A faithful PyTorch translation of the original NeRF that reproduces the paper’s results while claiming a 1.3× speed-up over TensorFlow.

What it does
NeRF represents a 3D scene as a tiny fully connected neural network—roughly 5 MB of weights—that maps a 5D coordinate (position plus viewing angle) to color and opacity. This repo is a line-by-line PyTorch port of the original TensorFlow code; it trains the same network architecture so you can synthesize novel views of complex scenes from a handful of input photos. The README says it has been numerically tested against the official implementation and comes with pre-trained checkpoints for standard benchmark scenes like Lego and Fern.
The interesting bit
The selling point here isn’t novelty—it’s fidelity with a slight performance edge. The author claims a 1.3× speed-up over the original TensorFlow version while keeping the training loop and outputs numerically identical, which is harder than it sounds when moving between frameworks. There is even a separate reproduce branch containing tests that verify every function matches the reference implementation.
Key highlights
- Claims 1.3× faster training than the official TensorFlow release
- Numerically tested against the original authors’ code
- Includes pre-trained models and configs for synthetic (Lego, Ship) and real-world LLFF (Fern, Flower) datasets
- Reproducibility branch with
py.testsuites to verify parity - Network weights are tiny (~5 MB) for a full scene representation
Caveats
- The README pins PyTorch 1.4, which is several years old; compatibility with modern torch versions is unclear
- Training your own real-world scenes requires external dependencies like COLMAP and the LLFF codebase, not just this repo
- “Low-res” training still takes ~4–8 hours on a single RTX 2080 Ti, so it is hardly lightweight by modern standards
Verdict
Grab this if you need a battle-tested NeRF baseline in PyTorch for research or comparison. Skip it if you are looking for the latest accelerated NeRF variants—this is the 2020 original, faithfully preserved.
Frequently asked
- What is yenchenlin/nerf-pytorch?
- A faithful PyTorch translation of the original NeRF that reproduces the paper’s results while claiming a 1.3× speed-up over TensorFlow.
- Is nerf-pytorch open source?
- Yes — yenchenlin/nerf-pytorch is open source, released under the MIT license.
- What language is nerf-pytorch written in?
- yenchenlin/nerf-pytorch is primarily written in Python.
- How popular is nerf-pytorch?
- yenchenlin/nerf-pytorch has 6k stars on GitHub.
- Where can I find nerf-pytorch?
- yenchenlin/nerf-pytorch is on GitHub at https://github.com/yenchenlin/nerf-pytorch.