• Stars
    star
    1,606
  • Rank 29,137 (Top 0.6 %)
  • Language
    Python
  • License
    Other
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Implementation of Generating Diverse High-Fidelity Images with VQ-VAE-2 in PyTorch

vq-vae-2-pytorch

Implementation of Generating Diverse High-Fidelity Images with VQ-VAE-2 in PyTorch

Update

  • 2020-06-01

train_vqvae.py and vqvae.py now supports distributed training. You can use --n_gpu [NUM_GPUS] arguments for train_vqvae.py to use [NUM_GPUS] during training.

Requisite

  • Python >= 3.6
  • PyTorch >= 1.1
  • lmdb (for storing extracted codes)

Checkpoint of VQ-VAE pretrained on FFHQ

Usage

Currently supports 256px (top/bottom hierarchical prior)

  1. Stage 1 (VQ-VAE)

python train_vqvae.py [DATASET PATH]

If you use FFHQ, I highly recommends to preprocess images. (resize and convert to jpeg)

  1. Extract codes for stage 2 training

python extract_code.py --ckpt checkpoint/[VQ-VAE CHECKPOINT] --name [LMDB NAME] [DATASET PATH]

  1. Stage 2 (PixelSNAIL)

python train_pixelsnail.py [LMDB NAME]

Maybe it is better to use larger PixelSNAIL model. Currently model size is reduced due to GPU constraints.

Sample

Stage 1

Note: This is a training sample

Sample from Stage 1 (VQ-VAE)

More Repositories

1

stylegan2-pytorch

Implementation of Analyzing and Improving the Image Quality of StyleGAN (StyleGAN 2) in PyTorch
Python
2,728
star
2

style-based-gan-pytorch

Implementation A Style-Based Generator Architecture for Generative Adversarial Networks in PyTorch
Python
1,099
star
3

glow-pytorch

PyTorch implementation of Glow
Python
508
star
4

alias-free-gan-pytorch

Unofficial implementation of Alias-Free Generative Adversarial Networks. (https://arxiv.org/abs/2106.12423) in PyTorch
Python
507
star
5

denoising-diffusion-pytorch

Implementation of Denoising Diffusion Probabilistic Models in PyTorch
Python
360
star
6

ml-papers

My collection of machine learning papers
267
star
7

swapping-autoencoder-pytorch

Unofficial implementation of Swapping Autoencoder for Deep Image Manipulation (https://arxiv.org/abs/2007.00653) in PyTorch
Python
255
star
8

mac-network-pytorch

Memory, Attention and Composition (MAC) Network for CLEVR implemented in PyTorch
Python
85
star
9

vision-transformers-pytorch

Implementation of various Vision Transformers I found interesting
Python
83
star
10

adaptive-softmax-pytorch

Adaptive Softmax implementation for PyTorch
Python
79
star
11

sagan-pytorch

Self-Attention Generative Adversarial Networks Implementation in PyTorch
Python
74
star
12

igebm-pytorch

Implicit Generation and Generalization in Energy Based Models in PyTorch
Python
65
star
13

depthwise-conv-pytorch

Faster depthwise convolutions for PyTorch
Cuda
64
star
14

ocr-pytorch

Object-Contextual Representations for Semantic Segmentation in PyTorch
Python
63
star
15

progressive-gan-pytorch

Implemetatin of Progressive Growing of GANs in PyTorch
Python
62
star
16

relation-networks-pytorch

Relation Networks for CLEVR implemented in PyTorch
Python
61
star
17

imputer-pytorch

Implementation of Imputer: Sequence Modelling via Imputation and Dynamic Programming in PyTorch
Python
58
star
18

fcos-pytorch

Re-implementation of FCOS for personal study
Python
51
star
19

knotter

Implementation of Mapper algorithm for Topological Data Analysis
JavaScript
45
star
20

semantic-pyramid-pytorch

Implementation of Semantic Pyramid for Image Generation (https://arxiv.org/abs/2003.06221) in PyTorch
Python
39
star
21

id-gan-pytorch

Information Distillation Generative Adversrial Network in PyTorch
Python
27
star
22

nerf-pytorch

Python
21
star
23

tensorfn

Weakly opinionated library for implementing ML models. Less boilerplate, More rigor
Python
20
star
24

taming-transformers-pytorch

Implementation of Taming Transformers for High-Resolution Image Synthesis (https://arxiv.org/abs/2012.09841) in PyTorch
16
star
25

film-pytorch

Just another implementation of FiLM in PyTorch
Python
14
star
26

melgan-pytorch

MelGAN and Tacotron 2 in PyTorch
Python
11
star
27

instant-ngp-pytorch

Study for Instant neural graphics primitives (Unofficial)
11
star
28

meshfn

Framework for Human Alignment Learning
Python
7
star
29

nansy-pytorch

Unofficial implementation of Neural Analysis and Synthesis
7
star
30

sarigan-pytorch

Unofficial implementation of Learning Semantic-aware Normalization for Generative Adversarial Networks (SariGAN) in PyTorch
7
star
31

lvpga-pytorch

Implementation of Perceptual Generative Autoencoders in PyTorch
Python
5
star
32

arxiv-sanity

arXiv feed tool that heavily inspired by Arxiv Sanity Preserver
Python
5
star
33

esrgan-pytorch

ESRGAN: Enhanced Super-Resolution Generative Adversarial Networks in PyTorch
3
star
34

dockerfiles

dockerfiles
Dockerfile
3
star
35

sujip

Non-opionated utility library for PyTorch
Python
2
star
36

rosinality.github.io

HTML
2
star
37

small-logan-pytorch

Small-GAN and LOGAN in PyTorch
2
star
38

maskrcnn-pytorch

Re-implementation of Mask R-CNN for personal study
2
star
39

synapticmap

Synaptic Map - Simple mindmapping program with directional connections
JavaScript
1
star
40

langfn

A DSL for LLMs
1
star
41

usrnet-pytorch

Reimplementation of Deep Unfolding Network for Image Super-Resolution for self study.
1
star
42

fill-blank

Paragraph embedding by solving the fill in the blank problems
Python
1
star
43

centernet-pytorch

Re-implementation of CenterNet for personal study
1
star