glow-pytorch  by chaiyujin

PyTorch implementation of OpenAI's Glow generative flow paper

created 7 years ago
513 stars

Top 61.8% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides a PyTorch implementation of OpenAI's "Glow: Generative Flow with Invertible 1x1 Convolutions" paper. It's designed for researchers and practitioners interested in generative modeling, offering a functional implementation of the Glow architecture for image generation and attribute manipulation tasks.

How It Works

The implementation follows the paper's description, utilizing invertible 1x1 convolutions for permutation and affine coupling layers for feature transformation. This design allows for efficient computation of the log-likelihood and direct sampling from the learned distribution, enabling high-quality generative modeling. Modules are adapted from the official TensorFlow version for robustness.

Quick Start & Requirements

  • Install: pip install -r requirements.txt (assuming requirements.txt exists)
  • Prerequisites: PyTorch, Python 3.x. Specific versions not detailed. GPU recommended for training.
  • Scripts:
    • Training: python train.py <hparams> <dataset> <dataset_root>
    • Inference/Manipulation: python infer_celeba.py <hparams> <dataset_root> <z_dir>
  • Pre-trained Model: Available via Dropbox link (not provided in README).

Highlighted Details

  • Implements the core Glow model with invertible 1x1 convolutions and affine coupling.
  • Supports training and inference for generative tasks and attribute manipulation.
  • Demonstrates attribute manipulation examples (Smiling, Young, Pale_Skin, Male) on CelebA.
  • Trained a model on CelebA with specific hyperparameters (64x64x3 images, 512 hidden channels, K=32, L=3).

Maintenance & Community

  • The project is maintained by chaiyujin.
  • No specific community links (Discord, Slack) or roadmap are mentioned.

Licensing & Compatibility

  • The README does not explicitly state a license. Given the adaptation from OpenAI's TensorFlow version, users should verify licensing implications for commercial or closed-source use.

Limitations & Caveats

  • The project is marked with "TODO" items, indicating incomplete features (e.g., testing LU-decomposed 1x1 conv2d).
  • The author notes potential errors in the code and solicits community help for debugging.
  • Pre-trained model download link is not provided in the README.
Health Check
Last commit

6 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Ross Taylor Ross Taylor(Cofounder of General Reasoning; Creator of Papers with Code), and
3 more.

pixel-cnn by openai

0.1%
2k
TensorFlow implementation for PixelCNN++ research paper
created 9 years ago
updated 5 years ago
Starred by Lilian Weng Lilian Weng(Cofounder of Thinking Machines Lab), Patrick Kidger Patrick Kidger(Core Contributor to JAX ecosystem), and
4 more.

glow by openai

0.1%
3k
Generative flow research paper code
created 7 years ago
updated 1 year ago
Feedback? Help us improve.