Downloads · 30 days
43
2% of all-time downloads
boris/vqgan_f16_16384
vqgan_f16_16384 is a machine learning model from boris. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a Pytorch Lightning checkpoint of VQGAN, which learns a codebook of context-rich visual parts by leveraging both the use of convolutional methods and transformers. It was introduced in Taming Transformers for…
Downloads · 30 days
43
2% of all-time downloads
All-time downloads
2.6K
Public
Repo size
980 MB
Likes
6
Public
Click a slice to open those files.
.ckpt980 MB · 100%
From the Hugging Face model README
This is a Pytorch Lightning checkpoint of VQGAN, which learns a codebook of context-rich visual parts by leveraging both the use of convolutional methods and transformers. It was introduced in Taming Transformers for High-Resolution Image Synthesis (CVPR paper).
The model allows the encoding of images as a fixed-length sequence of tokens taken from the codebook.
This version of the model uses a reduction factor f=16 and a vocabulary of 13,384 tokens.
As an example of how the reduction factor works, images of size 256x256 are encoded to sequences of 256 tokens: 256/16 * 256/16. Images of 512x512 would result in sequences of 1024 tokens.
We fine-tuned on CC3M and YFCC100M to improve the encoding quality of people and faces, which are not very well represented in ImageNet. We used a subset of 2,268,720 images from CC3M and YFCC100M for this purpose.
Finetuning was performed in PyTorch using taming-transformers. The full training process and model preparation includes these steps:
flax-community/vqgan_f16_16384.The checkpoint can be loaded using Pytorch-Lightning.
Note: omegaconf==2.0.0 is required for loading the checkpoint.
flax-community/vqgan_f16_16384.This model was successfully used as part of the implementation of DALL·E mini. Our report contains more details on how to leverage it in an image encoding / generation pipeline.