mashb1t / Fooocus

Focus even better on prompting and generating
GNU General Public License v3.0
191 stars 32 forks source link

[Bug]: Input image tab Metadata does not read JPG metadata #57

Closed Turpo69 closed 1 month ago

Turpo69 commented 1 month ago

Checklist

What happened?

I updated to latest v2.6.0 and immediately noticed that Input image tab Metadata does not read metadata for some reason. I'm 100% sure it still worked in rc2. Turns out it's just a jpg problem. It reads metadata from png files just fine.

Steps to reproduce the problem

Generate image with Output Format jpeg and then try to import it with Input image tab Metadata - Apply metadata. Clicking Apply metadata will turn off Advanced options too.

What should have happened?

Show image metadata from Metadata Scheme fooocus (json) or a1111 (plain text).

What browsers do you use to access Fooocus?

Google Chrome, Other

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 10

Console logs

Console says: Could not find metadata in the image!

Additional information

No response

mashb1t commented 1 month ago

@Turpo69 please check out https://github.com/mashb1t/Fooocus/pull/58. Still trying to find a way to make it work with the image input element, but it works 100% for file input.

mashb1t commented 1 month ago

@Turpo69 fixed using type PIL, please restart Fooocus or pull main again. Side effect is also that metadata reading is much faster now as it uses only one image save / read cycle instead of two.