NVIDIA PhysicsNeMo Guide: Install and Run FNO, 3 Mistakes
NVIDIA PhysicsNeMo is an open-source PyTorch framework for physics machine learning: neural operators such as FNO, graph networks, diffusion models and ready-made training recipes for CFD, weather and structural problems. This guide installs PhysicsNeMo 2.3.0, the release of 19 November 2026, and runs a real FNO model. It also fixes two things the earlier version of this page got wrong: the Python version and the import.
Everything below ran on 2 December 2026 on a CPU-only machine in Python containers. There was no GPU, so this covers installation, the API and small CPU runs, not GPU training speed. Facts about the project come from the PhysicsNeMo README and changelog.
Contents
- NVIDIA PhysicsNeMo vs Modulus
- Install NVIDIA PhysicsNeMo
- The CPU install pitfall: install torch and torchvision together
- Build an FNO with the real NVIDIA PhysicsNeMo API
- FNO, PINN and when to use which
- Where to go next with NVIDIA PhysicsNeMo
- Before running NVIDIA PhysicsNeMo on a GPU
- FAQ: NVIDIA PhysicsNeMo
- What is NVIDIA PhysicsNeMo?
- Is PhysicsNeMo the same as NVIDIA Modulus?
- Can NVIDIA PhysicsNeMo run without a GPU?
- Which Python version does NVIDIA PhysicsNeMo need?
NVIDIA PhysicsNeMo vs Modulus
If you knew this project as NVIDIA Modulus: the PyPI package nvidia-modulus stops at version 0.9.0, with the same description as today's package, "A deep learning framework for AI-driven multi-physics systems". Current releases ship as nvidia-physicsnemo, from 1.0.0 up to 2.3.0, and import as physicsnemo. Old modulus imports and tutorials need updating.
Install NVIDIA PhysicsNeMo
NVIDIA PhysicsNeMo 2.3.0 requires Python 3.11 or newer (below 3.15). The old guide created a Python 3.10 environment, and pip refuses that:
ERROR: Could not find a version that satisfies the requirement nvidia-physicsnemo==2.3.0 (from versions: 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.3.0)
ERROR: No matching distribution found for nvidia-physicsnemo==2.3.0
The README offers three installs:
pip install "nvidia-physicsnemo[cu13]" # CUDA 13 (default in the README)
pip install "nvidia-physicsnemo[cu12]" --extra-index-url https://download.pytorch.org/whl/cu129
pip install nvidia-physicsnemo # basic, PyPI's default PyTorch
The README notes that the CUDA 12 backend is Linux-only and uses PyTorch 2.13. Optional extras combine with either backend, for example [cu13,gnns] for graph neural networks.
The CPU install pitfall: install torch and torchvision together
For a CPU-only machine I first installed PyTorch from the CPU index, then PhysicsNeMo. Importing the models then failed deep inside torchvision:
RuntimeError: operator torchvision::nms does not exist
pip had pulled a torchvision build from PyPI that did not match the CPU torch. Installing both from the CPU index first fixed it:
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install nvidia-physicsnemo==2.3.0
That gave torch 2.15.0+cpu, torchvision 0.29.2+cpu, timm 1.0.31 and warp-lang 1.20.0. The PhysicsNeMo step took 106 seconds, and site-packages grew to 1.6 GB. On import, NVIDIA Warp prints a harmless Could not find or load the NVIDIA CUDA driver warning on machines without a GPU.
Build an FNO with the real NVIDIA PhysicsNeMo API
The old example imported FNOModel from the top-level package. That name does not exist:
cannot import name 'FNOModel' from 'physicsnemo'
The Fourier Neural Operator lives in physicsnemo.models.fno as FNO. Its constructor takes in_channels, out_channels, dimension, latent_channels, num_fno_layers, num_fno_modes and padding options. A 2D model for a single input field (for example permeability) and a single output field (pressure):
import torch
from physicsnemo.models.fno import FNO
model = FNO(in_channels=1, out_channels=1, dimension=2,
latent_channels=32, num_fno_layers=4, num_fno_modes=12)
x = torch.randn(8, 1, 64, 64) # batch, channels, height, width
y = model(x) # (8, 1, 64, 64)
Results on CPU:
- The model has 2,365,217 parameters.
- A forward pass of 8 fields of 64×64 took 0.05 seconds.
- Leaving out the channel dimension gives a clear error:
ValueError: Expected 4D input (B, 1, ...) for 2D FNO, got 3D tensor with shape (8, 64, 64). - 50 Adam training steps on a toy target took 4.8 seconds, and the loss fell from 0.0690 to 0.0080.
The toy target is only a smoothed copy of the input, so the loss shows the training loop works, not that the model learned any physics. For real problems, start from the project's recipes. The README links examples for external aerodynamics, regional weather forecasting (StormCast) and structural mechanics.
FNO, PINN and when to use which
The earlier version mixed a physics-informed loss (a PDE residual) into the FNO example. These are two different ideas:
- Neural operator (FNO): learns a mapping from input fields to output fields from many solved examples on a regular grid. The README lists FNO for "regular Cartesian grids". Inference is fast once trained, but you need training data from a solver.
- Physics-informed training: adds the residual of the governing equation to the loss, so the model is penalized for breaking the physics. It needs fewer or no solved examples, but training is harder.
Pick the model by your data. FNO and DPOT suit regular grids, graph networks (the gnns extra) suit unstructured meshes, and AFNO is listed for global forecasting on regular 2D fields.
Where to go next with NVIDIA PhysicsNeMo
After the FNO check works, the quickest way to something useful is one of the training recipes in the repository's examples folder, run with a small dataset first. Read each recipe's README for its dataset download and licence notes, keep the PhysicsNeMo version pinned in your environment, and record the PyTorch build you used, because the CUDA and CPU wheels behave differently at install time, as the torchvision error above shows.
Before running NVIDIA PhysicsNeMo on a GPU
- Use the CUDA extra that matches your driver (
cu13orcu12) instead of the basic install. - Check
torch.cuda.is_available()first. In my CPU test it returnedFalse, and everything ran on the CPU without warning apart from Warp's message. - Some datapipes and examples download datasets or checkpoints on demand. The README carries a notice that those materials have their own licenses.
For other Python ML stacks on Linux, see Linux distributions for machine learning, where Python versions also changed the libraries pip installed.
FAQ: NVIDIA PhysicsNeMo
What is NVIDIA PhysicsNeMo?
An open-source PyTorch framework for physics ML and AI for science, with models such as FNO, graph networks and diffusion models, plus training recipes. Version 2.3.0 was released on 19 November 2026.
Is PhysicsNeMo the same as NVIDIA Modulus?
The nvidia-modulus package ends at 0.9.0 with the same project description. Current releases are nvidia-physicsnemo and import as physicsnemo.
Can NVIDIA PhysicsNeMo run without a GPU?
Yes, for learning and small models. Install CPU builds of torch and torchvision together, then nvidia-physicsnemo.
Which Python version does NVIDIA PhysicsNeMo need?
Python 3.11 to 3.14 for version 2.3.0. Python 3.10 only gets versions up to 1.3.0.
Comments
Post a Comment