basujindal / stable-diffusion

Optimized Stable Diffusion modified to run on lower GPU VRAM
Other
3.14k stars 467 forks source link

Inpainting #87

Open vijishmadhavan opened 1 year ago

vijishmadhavan commented 1 year ago

https://gist.github.com/vijishmadhavan/91c79b403fbac327fa950c35a40b18f9

I tried to create inpainting but fails, can somebody check.

seed_228024_00006 seed_443299_00005

TheEnhas commented 1 year ago

It's been added with the recent update and works fairly well, default strength at 0.99 is a bit too high though, should be something like 0.75 instead. Depends on the image though, in some cases 0.9 worked better

vijishmadhavan commented 1 year ago

I guess the issue is in the code that I have written, I tried to alter the strength but did not work.

GucciFlipFlops1917 commented 1 year ago

It was a good effort nonetheless. Exploring your code let me understand more of the base img2img code, so thank you for that.

agustincaniglia commented 1 year ago

Sorry but what is latent scale? I am trying this inpainting new feature update and trying to understand how it responds. Thank you for doing this.

basujindal commented 1 year ago

Sorry but what is latent scale? I am trying this inpainting new feature update and trying to understand how it responds. Thank you for doing this.

Hi, please ignore latent_scale for now (set it to 1), will remove it in the next update. (The code currently uses DDIM sampling and latent_scale is for a different sampler)

nnmbzr commented 1 year ago

Hello, great job! Can you please tell me how to add a ready-made mask for the image?

basujindal commented 1 year ago

Hello, great job! Can you please tell me how to add a ready-made mask for the image?

Hi, I will add this feature for the gradio interface in a day or two. Cheers!