Stored History - Compression Settings
Hello, I've been using Krita AI Diffusion for the past few days, and I think it's an absolute game changer for ease of refining AI generated images. However, I've since noticed that there is significant compression quality loss in the Stored History images. If I understand the way it works correctly, any generated images not applied to the canvas during the current session, are compressed down when saving the .kra file (as individual webp files).
I first noticed this after reopening a project and seeing that fine details like that of skin texture or stubble were significantly softened/blurred due to the level of compression when compared with their applied versions. There were also significant artifacts on previously smooth gradient areas. I've attached a couple images showing the amount of image degradation. I don't agree that the current compression setting is high quality. #627 Would it be possible to allow users to decide what level of quality these history images are saved at?
Normally, while working on images in Krita or GIMP, I'm accustomed to working iteratively and non-destructively, on many unmerged layers. I don't recall running into any storage or file size issues due to this, but perhaps Krita does have a limit to file size? I have noticed it's not possible to set the Stored History setting beyond 100 MB, and I'm not sure what happens once that is reached though I'd set it as high as possible to keep all generations. I assume that implementing lossless compression would make a file reach this 100 MB maximum fairly quickly.
Perhaps, if some compression must be maintained to avoid the .kra files becoming too unwieldy, then some other setting could be enabled to simply write all generated images to a specified directory outside of Krita (as if an extra Save Image node were added to each ComfyUI workflow). I'd greatly prefer the option to keep lossless copies of all of these image generations as storage is so cheap these days.
Possible workarounds:
- I could simply make sure to apply each and every possible generated image to the canvas in case I desire to work with the uncompressed version in the future.
- Somehow restore the quality of the compressed versions through upscaling. The same concept as what Krita AI Diffusion already does in general, but when I tried to do this to the aforementioned lossy images, I've found it was trickier to restore the blurred/softened textures without losing even more of the original generation. It's also time consuming.
- Perhaps it would be possible to regenerate these images directly from original seed, prompt, etc, but seemingly not, since the original context area might have changed from the original generation time. If all workflow files were automatically kept, then of course they would contain the original image inputs in Base64, but given the extra storage requirements, it would be better to just keep the lossless generated images.
Sorry if this seems like a huge nitpick, but I thought I'd offer some feedback as a user.
Storing lossless copies beyond 100MB is possible, I don't think there's a hard limit. There are practical concerns:
- Storage might be cheap, but don't underestimate how easily you can fill up space with "garbage". Depending on resolution you work at, lossless images are quite large.
- Bigger files take longer to load and save. This becomes very noticeable at some point.
Regarding dumping all generations and non-destructive workflows: The way I see it, you also don't save a snapshot of every brush stroke you make, every selection copy, every transformation, each resize, etc. It's completely impractical. You use layers or masks explicitly for certain checkpoints you care about. I just don't see how AI generation is any different. Often it's only a tiny piece in a workflow.
This doesn't mean a lossless option can't be useful, maybe shorter history is a good trade off for keeping original quality.