InvokeAI
InvokeAI copied to clipboard
[bug]: Uploaded images lose metadata
Is there an existing issue for this?
- [X] I have searched the existing issues
OS
Windows
GPU
cuda
VRAM
No response
What happened?
When you create an image with Invoke, it adds metadata to the file. This metadata can be seen by clicking the Info button in the WebUI. If you drag the created image into the Uploads area, then click the Info button, it will say that No Metadata is available. However if you take the same image and drop it into Automatic1111, it will read the metadata. Invoke is somehow failing to read the metadata on uploaded images, or even images that have been dragged from the Generation window to the Uploads window.
Screenshots

Additional context
No response
Contact Details
[email protected], Steve Warner#1284 on Discord
@psychedelicious This is actually an enhancement request, but is something that I have bumped into on several occasions myself and wish there were a fix for. I have a whole bunch of images on my external disk from earlier versions of invokeai, and I wish I could upload them and easily retrieve their metadata.
@realstevewarner @lstein
I'm pretty sure that the metadata is readable, but you have to refresh the page. The server doesn't read the metadata correctly when first uploading an image.
Going to file this under no-fix because this will be a non-issue on the new server/API.
That's weird. Okay. So I checked and yes, it does show the metadata once I refresh the page. Strange that we'd have to do that. But you're saying the next version of Invoke this won't be required? I'm not sure what the new server/api is.
@realstevewarner
We have v2.3.0 pending release. It will not be fixed in that.
The bug is in the current web server - we are really trying to not making any more changes to it because any work there will be lost once we move to a new server. I can't give a solid ETA on the release that will fix this, sorry. If it turns out to take longer than expected, maybe we can address this sooner.
Okay. Thanks for the update. Happy to hear there's a workaround at least. One last question. If I refresh my browser, it resets all my prompt settings, size, sampler, etc. Any way to avoid that if I'm just trying to get metadata on an imported image?
@realstevewarner You shouldn't lose anything on refresh - that's a different bug.
Please try Reset Web UI from Settings (gear icon @ top right) then refresh the page (this will definitely clear out all the your settings). Then try entering a prompt, wait a second for it to save, and refresh the page. Does it remember it now?
Nope. It wipes out all my settings. Keeps the model, fortunately. But my prompt, seed, sampler, CFG, etc. all go away. I know I can get those back by right clicking on the last generated image and pressing "use all." So it's not a crisis. Just an annoyance.
@realstevewarner
Hmm. Please refresh your browser while on InvokeAI and see if there is any output in the javascript console. Here's how to open the javascript console on most browsers.
-
Do you see any output? Please copy and paste everything there if so.
-
After double-checking that you are on the InvokeAI UI page, paste
localStorage.clear()in the console and press Enter to fully reset the InvokeAI UI. Then try changing some settings and see if they persist. Any luck?
- I opened the Javascript console for the Invoke web UI page while Invoke was running and refreshed the page. Here's what I got.

I then did a full UI reset (from the Gear icon) and refreshed the page. The Javascript panel showed:

- Once on the Invoke UI page, I tried the localStorage.clear() command into the command line console but it would not allow user input. I tried typing the command directly but it would not accept it. It seems that I can't type into the command line interface while in WebUI mode. So I tried to force the command by putting it into the prompt field of the webUI. I figured it might pass the command down to the console. Nope. It generated the following image. LOL.

The issue isn't Invoke, though. It's my browser. I'm using Brave (with all protective shields turned off). On a whim, I tried running the WebUI in Firefox and it was able to save all the settings even after a refresh. Moreover, I didn't get the error loading in thumbnails that I normally get in Brave. At least not to the same prevelance. It's definitely a browser issue. I'll look into the Brave settings a bit more and see if there's anything else I can do to get it to work better.
Many thanks for the ongoing support!
Thanks for the troubleshooting, and great find re: brave. I'll download that browser and see if I can recreate the issue.
To clarify I meant the browser JavaScript console not the command line where you start the server. If you couldn't type into the JavaScript console... well, that's really weird!
Ah! Okay. I'm dumb. LOL. I typed that into the Javascript console and it said "undefined"

But once I refreshed the page, it kept all the settings! I can't explain that at all. But it worked!
Yes, that's the expected output. Something in the browser's storage of your settings had gone sideways. localStorage.clear() is the nuke-everything-button.
Glad it's working! Just to confirm, does this fix the issue for Brave?
With regards to the issue of it losing the settings once I refresh, absolutely. And as noted earlier, refreshing seems to fix the metadata issue of uploaded images. The only outstanding issue I see is the occasional missing thumbnail. The UI throws out an error and I get a "broken" icon. The images are still there, however. I just can't get a preview of them.


Thanks, I'll need to look into that. Do the thumbnails for those specific images never ever display, or only sometimes display?
It's random. If I refresh the page, some will display. Others will not. It's usually about 3 to 5 that just don't show up, but refreshing will make them show up and others not.
Thanks again for your help with this!
Ok, gotcha. I'll keep this in mind as we work on migrating to the new server.
I just tested with RC7 and the only way I can get the metadata in an uploaded image to display is by resetting the WebGUI and then reloading. Just a reload doesn't seem to do it. I don't consider this a blocking issue, but something to keep in mind.
That really shouldn't be needed. The gallery data isn't persisted to the browser. I have a feeling something is funky in localStorage and sometimes the UI Reset isn't clearing everything out properly. I need to dedicate a chunk of time to this class of problem, but it's really hard to reproduce.
There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.