valeoai / Maskgit-pytorch

unofficial MaskGIT reproduction in PyTorch
MIT License
161 stars 15 forks source link

train vqgan #11

Closed brucelighter closed 3 months ago

brucelighter commented 7 months ago

I want to use my own Dataset to train. So do I need to retrain vqgan? if so I see that vqgan training seems to be missing the discriminator. how do I train vqgan?

llvictorll commented 7 months ago

Hello,

It depends if your dataset is "far" from ImageNet images. If so, you may want to retrain the VQGAN, but that is beyond the scope of this repository. Please refer to the official repository of the [VQGAN] (https://github.com/CompVis/taming-transformers) for more details on how to train the model.

If your dataset is "close" to ImageNet images, there is no need to retrain the VQGAN, you can use the provided one directly.

Best,

Best,

Victor

brucelighter commented 7 months ago

Hello,

It depends if your dataset is "far" from ImageNet images. If so, you may want to retrain the VQGAN, but that is beyond the scope of this repository. Please refer to the official repository of the [VQGAN] (https://github.com/CompVis/taming-transformers) for more details on how to train the model.

If your dataset is "close" to ImageNet images, there is no need to retrain the VQGAN, you can use the provided one directly.

Best,

Best,

Victor

Thank you for your reply. I have one more question. If I want to use it for image inpainting tasks, do I only need to retrain the second part? So how do the input images and masks become code

daiyixiang666 commented 5 months ago

Hello, It depends if your dataset is "far" from ImageNet images. If so, you may want to retrain the VQGAN, but that is beyond the scope of this repository. Please refer to the official repository of the [VQGAN] (https://github.com/CompVis/taming-transformers) for more details on how to train the model. If your dataset is "close" to ImageNet images, there is no need to retrain the VQGAN, you can use the provided one directly. Best, Best, Victor

Thank you for your reply. I have one more question. If I want to use it for image inpainting tasks, do I only need to retrain the second part? So how do the input images and masks become code

I think you do not need to retrain the model but just do some modification in the inference step is enough