# bayesiains/nflows

Normalizing flows in PyTorch

Repository: https://github.com/bayesiains/nflows
Canonical: https://ross.abutalabs.com/products/nflows
Language: Python
License: MIT
License Family: permissive
Topics: density-estimation, normalizing-flows, generative-model, pytorch
Last push: 2024-12-27T06:10:31+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2389, "days_push": 614, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1019, forks 135 (observed 2026-08-28T04:03:15.036490+00:00)

## What it is
nflows is a comprehensive PyTorch library of normalizing flows for density estimation and generative modeling. It provides invertible transforms, base distributions, and flow objects for computing log probabilities and sampling.

## Use cases
- estimate probability densities with normalizing flows
- build generative models in PyTorch
- sample from learned distributions
- compute log probabilities of data
- implement neural spline flows and autoregressive transforms

## When to choose
- you need normalizing flows in PyTorch with a clean, composable API
- you want well-tested implementations of flows like masked autoregressive and spline transforms
- you need density estimation or sampling from invertible transformations

## When to avoid
- you need diffusion models or GANs rather than normalizing flows
- you want a framework-agnostic or JAX/TF implementation
- you need large-scale training features like distributed training out of the box

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning, data-science
- platform: python
- tags: normalizing-flows, pytorch, density-estimation, generative-models, probabilistic-modeling

## Member repositories
- bayesiains/nflows (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:15.036490+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:09:21.666951+00:00, confidence not recorded.
  - readme: https://github.com/bayesiains/nflows (fetched 2026-08-28T04:03:15.036490+00:00, sha 42b9cd687d49)
  - registry_pypi: https://pypi.org/pypi/nflows/json (fetched 2026-08-29T13:09:32.690943+00:00, sha 9548d2f1d900)
- Data as of 2026-08-30T08:39:29.467469+00:00.
