OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Normalizing Flows

Normalizing Flows is a Python/PyTorch repository of reimplementations of normalizing-flow algorithms for density estimation and related probability modeling. It includes BNAF, Glow, MAF, RealNVP, planar flows and a variational-inference implementation, with command-line examples for training, evaluation, plotting, generation and image-attribute visualisation.

Independent OpenViST project profile, based on linked sources.

Normalizing Flows — Hands-on experiments with multiple named normalizing-flow approaches
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want code examples for implementing and experimenting with normalizing-flow density estimators in PyTorch, and can provide the relevant datasets and training configuration.

Who it is for

  • Researchers exploring neural density estimation and normalizing-flow methods.
  • Python/PyTorch developers seeking example implementations for probability-modeling experiments.
  • Users comparing flow methods on toy distributions, tabular datasets or documented image datasets.

Documented uses

  • Train BNAF on listed two-dimensional toy datasets and plot a saved checkpoint.
  • Train, evaluate and generate image samples with the Glow implementation.
  • Train or evaluate MAF-family models on listed tabular datasets or MNIST.
  • Inspect example density-estimation results for toy data and test energy potentials.
Before you choose

Requirements & limits

  • The repository includes distinct scripts and workflows for BNAF, Glow and MAF rather than one unified interface.
  • Glow's documented distributed-training command uses multiple GPUs; larger model configurations may need gradient checkpointing.
  • MAF dataset files must be placed in ./data or supplied through data_dir.
  • The README describes implementations and example experiments, not a hosted service or API.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Train and plot BNAF on a toy dataset

Run the documented BNAF toy-density training workflow and plot a saved checkpoint.

Before you start

  • Python and the repository's PyTorch implementation.
  • A choice of dataset: u1, u2, u3, u4, 8gaussians, checkerboard or 2spirals.

Steps

  1. Run the command below with a selected --dataset and the desired --log_interval, --n_steps, --n_hidden and --hidden_dim values.

    Documented command
    python bnaf.py --train
  2. Use --plot with --restore_file set to the path of the .pt checkpoint.

Expected outcome

The documented workflow trains BNAF on a toy density-estimation dataset and plots a saved model.

Guide limitations

  • The README lists additional options, including learning rate, learning-rate decay and patience, CUDA device ID and batch size, but does not prescribe values for a new experiment.
Source-based practical guide

Train and generate samples with Glow

Follow the documented Glow distributed-training and sample-generation workflow for CelebA.

Before you start

  • PyTorch distributed support and a CelebA data location.
  • A trained Glow checkpoint and its saved model settings for the generation stage.

Steps

  1. Run the command below with --nproc_per_node set to the number of GPUs, followed by glow.py --train --distributed and the documented dataset, data directory and model options.

    Documented command
    python -m torch.distributed.launch
  2. Run glow.py --generate with the checkpoint path, dataset, data directory and saved model options; set --z_std to select a temperature, or leave it blank to generate a range.

Expected outcome

The documented stages train a Glow model and generate image samples from a checkpoint.

Guide limitations

  • The README's training example uses multiple GPUs; it does not give a single-GPU version of this distributed command.
  • The README notes that larger models or images may require gradient checkpointing and describes a large-model example as slow.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
8 November 2026
Original website title
kamenbliznashki/normalizing_flows · Official homepage title · retained in its source language