stable-diffusion-webui/scripts
xaedes f6aa2c64eb
Add mask_restore to restore images based on mask, fixing #665 (#898)
* Add mask_restore option to give users the option to restore images based on mask, fixing #665.

Before commit c73fdd78  (Implement masking during sampling to improve blending, #308)
image mask was applied after sampling, resulting in masked parts that are not regenerated
to actually stay the same.
Since c73fdd78 the masked img2img will change the whole image, even in masked areas.
It gives better looking results at first glance, but will result in image degredation when
applied a few times. See issue #665.

In the workflow of using repeated masked img2img, users may want to use this options to keep the parts
of image they actually want to keep without image degradation. A final masked img2img or whole image img2img with mask_restore disabled
will give the better blending of "Implement masking during sampling".

* revert changes of a7be43ba in change_image_editor_mode

* fix ui_functions.change_image_editor_mode by adding gr.update to the end of the list it returns

* revert inserted newlines and whitespaces to match format of previous code

* improve caption of new option mask_restore

"Only modify regenerated parts of image"

* fix ui_functions.change_image_editor_mode by adding gr.update to the end of the list it returns

an old copy of the function exists in webui.py, this superflous function mistakenly was changed by the earlier commit b6a9e16b

* remove unused functions that are near duplicates of functions in ui_functions.py
2022-09-10 00:07:14 +03:00
..
webui Made sure img2txt and img2img checkboxes respect YAML defaults 2022-09-08 23:50:33 -07:00
perlin.py when in outcrop mode, mask added regions and fill in with voroni noise for better outpainting 2022-09-09 10:13:38 -04:00
relauncher.py Tiling parameter (#911) 2022-09-09 20:33:04 +03:00
webui_streamlit.py Add mask_restore to restore images based on mask, fixing #665 (#898) 2022-09-10 00:07:14 +03:00
webui.py Add mask_restore to restore images based on mask, fixing #665 (#898) 2022-09-10 00:07:14 +03:00