sd-webui-controlnet
sd-webui-controlnet copied to clipboard
"Read Generation From Prompt" Support
It would be incredibly useful if pressing the "Read Generation Parameters From Prompt" button also filled in this extension's ControlNet info. I often use mildly complex multi-ControlNet setups, so applying them to ControlNet each time I open the WebUI can involve meticulously copying each setting and slider back into it's right position.
If somehow, pressing the button would also read and fill in the ControlNet metadata saved with each prompt, that would make sessions much easier and faster to set up. It would also make it much easier to switch between different ControlNet setups entirely.
This is great -- I have also searched for a way to improve the controlnet setup process -- i have a few questions:
- where exactly is the "Read Generation Parameters From Prompt" button?
- Is this generating from metadata in the PNG? I often use the same prompt with different settings for different purpose.
Thanks!
where exactly is the "Read Generation Parameters From Prompt" button?
See here: https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8/javascript/hints.js#L17
Seems to be the button that pastes last generation info into the gradio components.

- Is this generating from metadata in the PNG? I often use the same prompt with different settings for different purpose.
Yes - ControlNet actually allows for a lot of consistent shapes and poses, so I've actually set up different templates to create characters from. So I end up reusing ControlNet settings a lot between sessions and making only minor adjustments here and there. For example, to draw a character portrait at a specific angle.
It's not too unlike reusing prompts themselves, so being able to press the Read button and have it also fill in ControlNet would be really convenient. Especially when working with Multi-ControlNet.
Thanks, I have used that button recently but didn't understand what it was doing, because I used it in txt2img and it pulled a random set of parameters (maybe the last image generated?). I will have to test this in img2img, I assume if you drop an image into the source pane and hit the button, it will read the metadata and populate the various configuration.
For controlnet, I would expect it to populate the model, preprocessor, preproc res, and thresholds, but not the source image (I'm happy to do that on my own and it's likely cumbersome to store as metadata (filepath reference)).
I agree, this would be VERY, VERY useful -- I would say that it would be great if the setup could be replicated when using the various "send to" buttons as well, because txt2img doesn't have a source image to copy generation parameters from.
I posted an issue yesterday to at least have the preprocessor metadata stored with the png (resolution and thresholds), because they have such a huge effect on the image results, and I often lose my setup because of experimentation or having to reload, and it can be hard to get back to that sweet spot that you thought wasn't good enough but turns out is the best you had. :)
The button reads the metadata you put in the prompt field, not from any PNG. So you have to paste metadata text into the prompt and then press the button. Works for text2img and img2img.
I tend to copy and save the metadata outputted down beneath each generated image, which I can then copy back in with Read whenever I want. ControlNet metadata is already included in that text, including preprocessor, model, guidance, etc. So I'm just requesting that it can be Read back in, since the Read button currently ignores that metadata.
And yes, if you leave the prompt field empty, the Read button copies the last prompt. But if you put in actual metadata, it'll scan in that instead - including model, steps, size, hiresfix, and any other built-in text2img / img2img settings.
Anyone working on this by chance? This would be a great workflow enhancement, as it is control painstaking to setup controlnets and switching between projects.
Also, please note my relate Issue https://github.com/Mikubill/sd-webui-controlnet/issues/399#issue-1600272521
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.
still doesn't work, atleast for me on the latest version.
I wish it could read that metadata for controlnet as well. It would really make the process so much easier!
Yeah, controlnet is fine for one off images, but SD by it's very nature requires a lot of testing x/y/z plotting, and using controlnet to that end is frustrating. Seconding the idea about being able to specify controlnet settings inside the prompt. It would also conveniently ensure settings get recorded in the metadata with no extra coding hassle.