Home

Awesome

SBER-MoVQGAN

Framework: PyTorch Huggingface space Open In Colab

Habr post

SBER-MoVQGAN (Modulated Vector Quantized GAN) is a new SOTA model in the image reconstruction problem. This model is based on code from the VQGAN repository and modifications from the original MoVQGAN paper. The architecture of SBER-MoVQGAN is shown below in the figure.

SBER-MoVQGAN was successfully implemented in Kandinsky 2.1, and became one of the architecture blocks that allowed to significantly improve the quality of image generation from text.

Models

The following table shows a comparison of the models on the Imagenet dataset in terms of FID, SSIM, and PSNR metrics. A more detailed description of the experiments and a comparison with other models can be found in the Habr post.

ModelLatent sizeNum ZTrain stepsFIDSSIMPSNRL1
ViT-VQGAN*32x3281925000001,28---
RQ-VAE*8x8x161638410 epochs1,83---
Mo-VQGAN*16x16x4102440 epochs1,120,67322,42-
VQ CompVis32x32163849710431,340,6523,8470,053
KL CompVis32x32-2468030,9680,69225,1120,047
SBER-VQGAN (from pretrain)32x3281921 epoch1,4390,68224,3140,05
SBER-MoVQGAN 67M32x32163842M0,9650,72526,4490,042
SBER-MoVQGAN 102M32x32163842360k0,7760,73726,8890,04
SBER-MoVQGAN 270M32x32163841330k0,686💥0,741💥27,037💥0,039💥

How to use

Install

pip install "git+https://github.com/ai-forever/MoVQGAN.git"

Train

python main.py --config configs/movqgan_270M.yaml

Inference

Check jupyter notebook with example in ./notebooks folder or Open In Colab

Examples

This section provides examples of image reconstruction for all versions of SBER-MoVQGAN on hard-to-recover domains such as faces, text, and other complex scenes.

Authors