All models

FrEIA_GLOWCouplingBlock

A normalizing flow for images that swaps fixed channel permutations for learned invertible 1x1 convolutions.

Diffusion and generative · 2,208 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 2,208 operations (2.3 MB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
Glow
Parameters
7.9M
Operations
2,208
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2018
Cited by
825 (as of 16 October 2026)
Authors
Diederik P. Kingma, Prafulla Dhariwal
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m1052
Graph hash
a4cf2c3782bbd77ad0e8ba7a96a1067515fcd107a01008b93caa76f85fb9fef1
Skeleton hash
fd86f6d95f7f49efc6a5f9eef5b978f391033e68938df116376f30851357caee
Architecture hash
b84f2e656f25ae15b3156a235d68898d5cecc6207c1e79b216874cd2d9d651b2
Diagram SHA-256
63ff165cd90c24c332f3779bfdefc053fb0c9370d3f6e7549ecd8f49e658643a
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

About this model's family

Glow is a flow-based generative model for images built around a learned invertible 1x1 convolution. Flows of this kind give exact log-likelihoods and exact latent inference, and both training and sampling parallelize. Its headline claim is that a model trained on the plain log-likelihood objective can synthesize and manipulate large images that look realistic.

Each step of flow is an actnorm layer, then the invertible 1x1 convolution, then an affine coupling layer. Steps are stacked inside a multi-scale architecture with a depth of flow K and a number of levels L. Actnorm is a per-channel scale and bias whose parameters are initialized so that activations have zero mean and unit variance on an initial minibatch of data. The 1x1 convolution replaces the fixed channel-reversing permutation of NICE and RealNVP with a learned weight matrix initialized as a random rotation. The last convolution of each coupling network is initialized to zero so every coupling layer starts as the identity, which the authors found helps when training very deep networks. Splits are only along the channel dimension, dropping the checkerboard spatial split of RealNVP to simplify the architecture.

On CIFAR-10 with K = 32 and L = 3, the invertible 1x1 convolution reached a lower negative log-likelihood and converged faster than either a channel reversal or a fixed random permutation, for both additive and affine couplings. In bits per dimension Glow reached 3.35 on CIFAR-10 against 3.49 for RealNVP, 4.09 against 4.28 on ImageNet 32x32, and 3.81 against 3.98 on ImageNet 64x64. Attribute manipulation needs no labels during training: the difference between the average latent of images with an attribute and without it gives a direction to move along. Generating one 256x256 image at batch size 1 took about 130ms on a single 1080 Ti.

All eight captured members here were built from the normflows library, a PyTorch implementation of discrete normalizing flows. Each is traced on a single 3x32x32 image, the CIFAR-10 resolution of the normflows Glow example, with L = 3, K = 16, 256 hidden channels and channel splits, and emits one scalar. That K = 16 is half the K = 32 the paper used for its CIFAR-10 runs. The roster names point at several code bases, among them the chaiyujin PyTorch port that describes its modules as adapted from the official TensorFlow version, but every captured graph comes from the same normflows adapter and configuration.

Key idea. Glow replaces the fixed channel permutation of NICE and RealNVP with a learned invertible 1x1 convolution whose weight matrix is initialized as a random rotation. Trained on the plain log-likelihood objective, it improves on RealNVP across standard image benchmarks and can synthesize and manipulate large images.

  • Glow
  • generative flow
  • normalizing flow
  • flow-based generative model
  • invertible 1x1 convolution
  • actnorm
  • affine coupling
  • image generation
  • density estimation
  • CIFAR-10
  • CelebA-HQ
  • normflows
  • openai glow
  • Kingma

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{kingma2018glowgenerativeflowinvertible,
      title={Glow: Generative Flow with Invertible 1x1 Convolutions}, 
      author={Diederik P. Kingma and Prafulla Dhariwal},
      year={2018},
      eprint={1807.03039},
      archivePrefix={arXiv},
      primaryClass={stat.ML},
      url={https://arxiv.org/abs/1807.03039}, 
}