DiffusionToolkit icon indicating copy to clipboard operation
DiffusionToolkit copied to clipboard

[BUG] Image not displayed, The given key was not present

Open Kluvwen opened this issue 1 year ago • 3 comments

Using primarily Novel AI, the error The given key was not present in the dictionary. has been occurring frequently as of some updates from them. 9/20/2024 12:26:56 AM: An error occurred while reading C:\Users\Kluvw\Downloads\AI_{{{{{zero pictured}}}}}, castle s-3338614828.png: The given key was not present in the dictionary.

at System.Text.Json.JsonElement.GetProperty(String propertyName) at Diffusion.IO.Metadata.ReadFooocusMREParameters(String data) at Diffusion.IO.Metadata.ReadFromFile(String file) at Diffusion.IO.MetadataScanner.Scan(IEnumerable`1 files)+MoveNext() Version: Diffusion Toolkit 1.7 Fix

Tool: NovelAI

To Reproduce This isn't happenning with every image, however it is happening frequently, with no change in prompt or methodology.

Expected behavior This is not expected, particularly images not showing at all, I was not aware this was an issue for some time until one I'd just added wasn't showing up and checking the log.

Affected Image(s) _{{{{{zero pictured}}}}}, castle s-3338614828

If possible, it would be preferable to show images even if they're producing an error if error allows for images to be shown.

Kluvwen avatar Sep 20 '24 04:09 Kluvwen

Thanks for finding this.

This build should resolve your issue while I am adding features and bug fixes for the next release.

https://github.com/RupertAvery/DiffusionToolkit/actions/runs/10975406944/artifacts/1962103501

It will also now allow the file to be loaded and viewed even if an error occurs. When a fix does come in, there is an option to Rescan selected images. Images with errors currently are marked with a red warning icon in the thumbnail, and the error information will be viewable in the Metadata as a new tab.

RupertAvery avatar Sep 21 '24 20:09 RupertAvery

Thanks so much, that looks to resolve both issues. I can close this or leave it open for visibility until the next release.

Kluvwen avatar Sep 21 '24 21:09 Kluvwen

Yes keep it open for now in case anyone else has the same issue, thanks!

RupertAvery avatar Sep 22 '24 01:09 RupertAvery