stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Fix pnginfo sendto, #7339
Describe what this pull request is trying to achieve.
Ever since the introduction of overrides, pnginfo sendto has not been working as expected. The model only sometimes received an override. Things like Clip Skip are always missing.
This PR aims to fix that, by always applying overrides when using pnginfo.
Additional notes and description of your changes A problem I had run into when developing this was that the way register_paste_params_button was not able to send overrides to inpaint. This was because parts of it are of course part of img2img. But when treating it like img2img, it wouldn't use the correct img2img sub-tab.
I solved this by introducing a new attribute tab_subname for ParamBinding, that when used, will do only very specific things with "inpaint", while everything else is done with "img2img".
I also defined override_settings_dict in such a way, that extensions will be able to use it (for example the image browser).
There are no changes to the visible UI.
Environment this was tested in
List the environment you have developed / tested this on. As per the contributing page, changes should be able to work on Windows out of the box.
- OS: Windows 10
- Browser: Firefox, Chrome
- Graphics card: NVIDIA RTX 2060 6GB
hoping to see this added
hoping to see this added
Me also! Thanks in advance (and AlUlkesh for the heads up)
Does this merge mean a default behaviour is added (put back?) with or without a settings/preference to enable or disable it?
As I commented on the other thread, sometimes you just want the prompt extracted and sent, not every single setting (like clip skip and model switch). At the moment some people find it annoying that it doesn't auto-model-switch. Personally I would also find it annoying if it ALWAYS did, without being able to set a preference either way.
There is a use-case for both ways, depending on people's workflow. Testing prompts with different models is the most basic use case, after generating hundred of images with one model, going back to find a good version you'd like to try with other models. If you do this a lot, and it auto-switches each time away from the model you wanted to try next, that wastes a lot of time.
Thanks for clarifying!
@EmmaWebGH It wouldn't switch, it overrides. It overrides everything that is in the pnginfo and can be overriden, that is this list: https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/ab059b6e4863eaa5e118a2043192584e6df51ed4/modules/generation_parameters_copypaste.py#L290-L299
So, for example, after you use sendto from pnginfo, you'd get overrides like this in the webui:

The model from before using pnginfo is still selected in the sd_model_checkpoint dropdown.
So, if you don't want the new model, you can click the little x and the selected one will be used again.
Does this address your concern?
i made my own fix for the issue in a742facd95189eb078087bce9cafbfad0723cff4
@AUTOMATIC1111 I think your fix doesn't address these issues that were in mine:
- sendto inpaint doesn't work for overrides
- override ui not exposed to extensions (for example image browser)
Are you planning on making a followup fix or should I make a new PR?