r/StableDiffusion Sep 11 '22

A better (?) way of doing img2img by finding the noise which reconstructs the original image Img2Img

Post image
894 Upvotes

View all comments

4

u/[deleted] Sep 12 '22 edited Sep 12 '22

[deleted]

10

u/borntopz8 Sep 12 '22

i guess the development of this feature is still in an early state, but i managed to get the first results.
basically you upload an image in img2img,
interrogate to obtain the prompt ---this gives me a low vram error but still generates the prompt that you'll find on top---
in the scripts you use img2imgalternative with that prompt you have obtained (check https://github.com/AUTOMATIC1111/stable-diffusion-webui in the img2imgalt section for the parameters they are very strict for now)
now generate and you should get an output very similar to your original image
if you change your main prompt now (still running the script with the previously obtained prompt) you should be able to modify the image keeping most of the details

3

u/Z3ROCOOL22 Sep 12 '22

I don't understand this part "interrogate to obtain the prompt---" Where you do that?

5

u/borntopz8 Sep 12 '22 edited Sep 12 '22

speaking about automatic1111 and his webui you should see in the img2img a button to generate and a button to interrogate. if not, update to the last version because the are making changes by the minute.

1

u/Z3ROCOOL22 Sep 13 '22

Yeah, i figured out now, thx.

1

u/gxcells Sep 12 '22

It works well to regenerate the original. But I could not make a change in the prompt without changing completely the picture (portrait).

5

u/borntopz8 Sep 12 '22

if you regenerate the original and change the main prompt (keeping the script img2imgalt on the original prompt the interrogation gave you) you should be able to have less "destructive" results
application of a style works well, but sometimes -let's say changing shirt color or hair color- is still too similar or too far from the image.

the implementation is in a very early state the most i can do is keeping my fingers crossed since i dont know much about coding and i rely heavly on repos and webuis.

1

u/gxcells Sep 12 '22

Thanks, I'll try this and play around also with different source images tonight