Acly / krita-ai-diffusion

Streamlined interface for generating images with AI in Krita. Inpaint and outpaint with optional text prompt, no tweaking required.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

(Suggesion) Saving images with the generation metadata

Miraihi opened this issue · comments

Hello, Acly. By now I'm mostly satisfied with how you handle and advance the development of your plugin, thanks for your hard work!

Still, while it is not that critical of a problem, but it's still a bit of a hassle that the pictures generated don't contain any generation metadata Civitai can pick up. Is it even possible to implement?

commented

Hi! There are the pictures you generate

  • as they come from ComfyUI (potentially just partial masked images that have to be inserted and blended at the right offset)
  • as they are saved by the history context menu
  • whatever you save or export via Krita

The first would probably contain metadata if they were saved via ComfyUI, but end up somewhere in its output directory and be of limited use. The second I briefly tried to add metadata but it turned out Qt (which I use to write images) doesn't support writing the tags the way Comfy does, so probably Civitai wouldn't pick it up either.

As for what you export, that's usually the product of a lot of generations, so a bit unclear what it should contain?

As for what you export, that's usually the product of a lot of generations, so a bit unclear what it should contain?

At least the prompt and the negative prompt, but I've also seen the resources used (Checkpoints and Loras) also saved as a part of the metadata. Usually they can be viewed using exiftool and built-in A111 image metadata reader.

commented

I meant in the case of saving/exporting Krita document, since it probably made of many prompts and prameters, it's unclear what to write.

The A1111 metadata is actually simple text, the only problem seems to be that it uses line breaks to separate the parameters. Somehow they aren't written properly, it seems like the image writer strips them.

it's unclear what to write.

Well, at least the metadata in one of the generated images you save by right clicking them in the plugin's window. A part of the prompt is already in the name of the file.

But as an alternative .txt sidecar with the metadata would also be acceptable.

commented

A1111 metadat looks something like this

prompt text goes here
Negative prompt: negative prompt text goes here
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 2341225840, Size: 512x512, Model: v1-5-pruned-emaonly

I can write that, but it's stripped of the line breaks, so comes out like this

prompt text goes hereNegative prompt: negative prompt text goes hereSteps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 2341225840, Size: 512x512, Model: v1-5-pruned-emaonly

So you can read it out, but tools/civitai who expect the line breaks may not be able to deal with that

I dunno. Is it useful? Feels like people will also want to turn it off because some are really attached to their super secret prompts, and then possibly report it as bug because it doesn't entirely work...

I dunno. Is it useful? Feels like people will also want to turn it off because some are really attached to their super secret prompts, and then possibly report it as bug because it doesn't entirely work...

Well, I'm suggesting this as a "nice to have" feature and nothing more. Of course it isn't vital. Some people would certainly turn it off because Civitai filters some prompts it deems unacceptable. Pretty sure I may be the only person who thinks he needs that feature, so don't go out of your way to implement it.

I dunno. Is it useful? Feels like people will also want to turn it off because some are really attached to their super secret prompts, and then possibly report it as bug because it doesn't entirely work...

Well, I'm suggesting this as a "nice to have" feature and nothing more. Of course it isn't vital. Some people would certainly turn it off because Civitai filters some prompts it deems unacceptable. Pretty sure I may be the only person who thinks he needs that feature, so don't go out of your way to implement it.

I'd personally hate it, i have uploaded images and got the comment its missing the meta data and i want the prompt information and can't get it in a1111.
I don't care if its AI i put the work time and effort into it, and like a lock if you don't have the right combination its hard to crack.

i just copy my prompt etc and put in a txt with same name as the image.

if that feature where added I'd want to be able to turn it on or off

commented

Well, I'm suggesting this as a "nice to have" feature and nothing more. Of course it isn't vital. Some people would certainly turn it off because Civitai filters some prompts it deems unacceptable. Pretty sure I may be the only person who thinks he needs that feature, so don't go out of your way to implement it.

I think it's totally reasonable because it should be really easy to have, but for unfortunate technical reasons it just won't work properly without investing unreasonable amount of time. Krita plugin environment can be a bit of a hassle sometimes. So I'd skip it for now.