Skip to content

Pseudo code for "VAR: Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction"

License

Notifications You must be signed in to change notification settings

taki0112/pseudo_var

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pseudo_var

Pseudo code for VAR: Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction


Details

Token block (not implemented here)

image

Training Process

1. VQVAE Training

image image
vqvae_loss = vqvae_training(img, patch_nums)
print('vqvae training finish')

2. VAR Training

image
var_loss = var_training(img, patch_nums, class_label)
print('var training finish')

Inference

VAR Inference

image
generated_image = var_inference(class_label, patch_nums)
print('Generate image: ', generated_image.shape)

About

Pseudo code for "VAR: Visual Autoregressive Modeling: Scalable Image Generation via Next-Scale Prediction"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages