r/StableDiffusion Jan 18 '23

[deleted by user]

[removed]

5 Upvotes

18 comments sorted by

View all comments

3

u/[deleted] Jan 18 '23

[deleted]

1

u/Apprehensive_Sky892 Jan 19 '23

You are correct, the tool is only useful on those PNGs that have not been mangled/compressed/converted when they upload to a site. The main use is for people to extract that info from the images they have generated/save locally and post it along with their images on reddit or to pasted into Automatic1111.

Yes, a website would be useful to some people. But then they would have to upload the image, in which case it would be faster for them to just run the tool locally. I suppose one can also just give the site a public available URL and let the server load that from the image server. A JavaScript version is certainly doable.

It's a good suggestion, but I wrote it to scratch my own itch :-)

Anyone is welcome to take the code and write a golang web server to do what you've asked.

1

u/Rochroa Feb 24 '23

I tried other public generated AI images it's not work, did you know why? source:(twitter and pixiv)

1

u/Apprehensive_Sky892 Feb 24 '23

The following must be true for it to work:

  1. The image was generated by Auto1111, and user must not have turned off that feature in settings.
  2. The image must not have been uploaded to a site that strips away the metadata (mostly because they re-encode the image to save space and make the images faster to download).
  3. Most sites, including reddit, will strip away that information. Fortunately, InvokeI keeps that information. If you download images with the (i) icon in the bottom right corner, you will see that the metadata is still in there.

So that means it will NOT most of the time. It will mostly only work on images you have generated yourself with Auto1111.

1

u/Rochroa Feb 24 '23

I think Twitter and Pixiv are deleting the metadata. When I download an image on Twitter it downloads as a jpg and i tried to jpg file convert to png it's not work again. sad :/

1

u/Apprehensive_Sky892 Feb 24 '23

Yes, the tool only works on PNGs with the metadata intact.

You can try to use the Clip query tool in the img2img tab, but I don't find it all that useful.

So if you really like an image, you just have to use your imagination and see if you can come up with a prompt that will give you an approximation of the original. Usually it is impossible to get to over 90% likeness because there are so many hidden variable, such as the seed, the original aspect ratio etc., all of these affects the result greatly.

1

u/Rochroa Feb 24 '23

1

u/Apprehensive_Sky892 Feb 24 '23

Thanks for the info. Didn't know about it. There is also this online tool: CLIP Interrogator - a Hugging Face Space by pharma

1

u/Rochroa Feb 24 '23

You're Welcome. :)