invoke-ai / InvokeAI

Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.38k stars 2.4k forks source link

"Use all" should include all generation metadata #4167

Open Malrama opened 1 year ago

Malrama commented 1 year ago

Is there an existing issue for this?

OS

Windows

GPU

cuda

VRAM

12GB

What version did you experience this issue on?

3.0.1post3 & 3.0.2a

What happened?

I tested 3.0.1post3 and 3.0.2a and just would like to report the following observations regarding metadata and "Use all":

3.0.1post3 and 3.0.2a:

Here is my argument why that would be important: Since it's not hard to have 1000+ pictures in your Galary, it's nearly impossible to remember all the settings used to generated them. I often scroll back to my previous pictures and maybe decide to pick up from there. Being able to trust "Use all" to generate me the same picture (in an optimal case) would be really helpful. It is possible to look into the metadata to get the information about "LORAs and VAEs" but even that step involves some searching and knowledge (reading metadata) that I would love to trust "Use all" for.

3.0.2a

I hope this Bug report is useful. If there are any further questions or testing needed on my side, I would be glad to assist.

Screenshots

No response

Additional context

No response

Contact Details

No response

gsreeves commented 1 year ago

Metadata isn't written correctly to image in the first place. Perhaps I should open an issue for that. Here are two issues with metadata written to images:

  1. Sometimes positive prompt appears in positive style: instead of in prompt:
  2. Combinatorial combinations specific to an image are not written, just the whole recipe for all the images, so you can't tell which is which. On the other hand, the data in the database itself looks fine. If program is getting it from db, then carry on.
dfl commented 1 year ago

I also noticed this issue. Also, I don't see any metadata in my downloaded images.

psychedelicious commented 1 year ago

We'd be happy for a contribution for this.

To help you get started, the functions to recall parameters are in invokeai/frontend/web/src/features/parameters/hooks/useRecallParameters.ts.

To recall things like LoRAs, we need to first verify that the models exist. The logic would flow like this:

Note that the current logic does not validate the model against the query cache! This should be fixed at the same time as recalling LoRAs etc.

You'd need to use the hooks exported from invokeai/frontend/web/src/services/api/endpoints/models.ts to get the available models, and confirm that the model to be recalled is in that list.

See invokeai/frontend/web/src/features/parameters/components/Parameters/MainModel/ParamMainModelSelect.tsx for an example of how to use the hooks. A more refined way to use the hooks is to use selectFromResult, which you can see in action here: invokeai/frontend/web/src/features/ui/components/tabs/ModelManager/subpanels/ModelManagerPanel/ModelList.tsx

If you are familiar with react/frontend dev and would like to take this on, I'm happy to help out. Ping me here or on discord (same username).