sd-webui-controlnet
sd-webui-controlnet copied to clipboard
Feature Request: Save preprocessor settings in PNG metadata
It would be great to have the preprocessor settings saved in the PNG metadata because they can have a VERY big impact on final image result. The preprocessor resolution and the two slider settings would be basically all that is needed to recreate an image. Often I find myself needing to reload the UI and I have to write down these values or else I might lose my progress and have to start over with finding the perfect preprocessing settings.
Thanks!
Note related Issue https://github.com/Mikubill/sd-webui-controlnet/issues/412#issue-1601653478
This is one of the reasons I haven't really adopted ControlNet yet. There is no way to record how you generated an image, unless you do it by hand. None of the metadata of which image or its settings is stored with the generated images, so regenerating them later is a difficult task.
I really like Ateist's idea of adopting the format of LoRAs in the prompt itself to store that metadata, something like <controlnet:openpose="filename", guidance:0.2>
.
The only additional thing would be the images themselves used as input, but I guess those could be stored in a kind of "library" folder somewhere.
At some point we could consider using the existing ui to generate a string to append to the prompt instead of driving the controlnet settings directly. This would make it possible both to use the UI and reproduce previous generations. To do this while preserving the angle bracket strings in the prompt, we can monkey patch get_multicond_learned_conditioning
or get_learned_conditioning
(to also consider the negative prompt) both defined in modules.prompt_parser
.
Although doing it this way would mean we also have to be able to put the text settings back into the user interface.
To store pictures in metadata, I have seen one or two ideas being thrown around, namely one of them is indexing image hashes in a database and using hashes to reference them. Maybe a proximity hash could make it possible to use the next image hash if a hash cannot be found. If anyone knows an extension that already does something like this, it could be useful to link it here.