RupertAvery / DiffusionToolkit

Metadata-indexer and Viewer for AI-generated images
MIT License
743 stars 46 forks source link

Copy All Parameters does not copy all parameters #107

Open splineclaw opened 1 year ago

splineclaw commented 1 year ago

Describe the issue Some image metadata is entirely hidden from view. In particular, Dynamic Prompts templates saved to PNG chunks do not appear anywhere in the application. Even "Copy all parameters" doesn't return them.

Version: v1.2.1

To Reproduce Here is a PNG that contains a Dynamic Prompts template in its metadata: 20230502082106-4167822713-6e430eb514-anything-v4 5-pruned In Diffusion Toolkit, it appears as so: nometadata dk inapp Even right-clicking an image > Copy Parameter > Copy all parameters does not include this information. This is the content copied from "Copy all parameters": image

Expected behavior I expect "Copy all parameters" to copy directly from the PNG chunk data, returning this information for the example: image

If this behavior is desired, I suggest renaming "Copy all parameters" to "Copy above parameters". Having a way to access all parameters is still useful. For example, in the right-click menu, a "Copy raw parameters" or "Copy all parameters" option could directly copy metadata from the file.

I think that copying full generation parameters (including templates or other unsupported information) would be the expected behavior from the "Copy Parameters" button below the image window, but I welcome discussion on this point.

RupertAvery commented 1 year ago

You're right.

The parameters do come from the file directly (not read from the database). Unfortunately I do parse the metadata into an typed object first, the main purpose being storing fields I can index into the database. One thing is that there are different formats involved, so I mostly just pick up the most common parameters, and format it into A1111 style.

Other metadata are stored as JSON, others as command line parameters, ComfyUI stores it as multi-object JSON that references other parts (nodes), so displaying it "raw" would be challenging.

I guess a "RAW" info "tab" could be one way to do it. with the current info being displayed as "basic" info.