patil-suraj / vit-vqgan

JAX implementation ViT-VQGAN
MIT License
77 stars 11 forks source link

Is it possible to configure Discriminator with image size other than 256? #29

Open kgonia opened 1 year ago

kgonia commented 1 year ago

I tried to use StyleGANDiscriminatorPreTrainedModel with config having images siez 512 x 512 but I got this error:

vit_vqgan/modelin │
│ g_stylegan_disc.py:314 in __call__                                                               │
│                                                                                                  │
│   311 │   │   │   y = block(y)                                                                   │
│   312 │   │                                                                                      │
│   313 │   │   # final block running on 4x4 feature maps                                          │
│ ❱ 314 │   │   assert min(y.shape[1:3]) == 4                                                      │
│   315 │   │                                                                                      │
│   316 │   │   y = self.stddev_layer(y)                                                           │
│   317 │   │   y = self.conv_out(y)                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
UnfilteredStackTrace: AssertionError

Should I change smth more or it's not supported to change image size?