lucidrains / DALLE-pytorch

Implementation / replication of DALL-E, OpenAI's Text to Image Transformer, in Pytorch
MIT License
5.57k stars 642 forks source link

VQGanVAE resolution and channels hard coded #438

Open rbazin opened 2 years ago

rbazin commented 2 years ago

Hello, in the module, in VQGanVAE class, self.resolution and self.channels are hard coded, whereas you could easily set them with

self.image_size = int(config.model.params.ddconfig.resolution) self.channels = int(config.model.params.ddconfig.in_channels)

Can you change that please ?

Best

lucidrains commented 2 years ago

@rbazin Hi Romain, could you point me where in the code this is? you may have opened an issue in the wrong repository

rbazin commented 2 years ago

Hello,

Sure, it's in DALLE-pytorch/dalle_pytorch/vae.py lines 190 and 191 in VQGanVAE class (resolution and image_size attributes)

Best regards

lucidrains commented 2 years ago

@rbazin ohh, those cannot be changed because we are using pretrained models from taming transformers out of Heidelberg