CompVis / latent-diffusion

High-Resolution Image Synthesis with Latent Diffusion Models
MIT License
11.59k stars 1.51k forks source link

create similar images from a real image. #55

Open loboere opened 2 years ago

loboere commented 2 years ago

Is there a way for this to create similar images of a real image like dall-e 2 does?

lxj616 commented 2 years ago

@loboere If you mean prompt using part of real image to create similar image, you can try my PR, which does inpainting such as generate a cat wearing a green hat with a real cat image

If you mean priming on a whole image, not a masked region, and generate similar result but not exact, you may need to do some coding, to manually craft a x_T=x_T to DDIM sampler, see my PR for reference (but I didn't code x_T), The way I give x0 to DDMS should work on x_T too... probably

images_inpainting

The complete code in my PR: https://github.com/CompVis/latent-diffusion/pull/57

illtellyoulater commented 2 years ago

I would really love this feature too! I mean priming on a whole image, not a masked image (however that would be interesting too).

@lxj616 @loboere do you have any plans for implementing it? (I cannot be of great help in that regard, sorry.)

loboere commented 2 years ago

for now implement the function of using a part of a real image you can try it in the colab that is in my repository

https://github.com/loboere/latent-diffusion-inpainting-colab