explainingai-code / StableDiffusion-PyTorch

This repo implements a Stable Diffusion model in PyTorch with all the essential components.
122 stars 25 forks source link

ldm for inpainting #16

Open ath90 opened 4 months ago

ath90 commented 4 months ago

Many thanks for your amazing work.

Im wondering for the cases of the inpainting do you pass the image and masked image through the same pretrained VAE. and what is the training data of this VAE is it on the images or the dataset contain also the masked images?? or you train separate VAEs for each one ?

explainingai-code commented 4 months ago

Thank you for the appreciation. I have never trained ldm for the inpainting task but from what I could figure out from the code/checkpoints provided by authors, you would pass the image to the same pre-trained autoencoder. So basically you wouldn't train autoencoder again specifically for inpainting task. The same autoencoder trained for image generation on your dataset, would be used for encoding the images/masked images for training inpainting ldm as well on your dataset.