* 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
* added image lab
* first release
model loading/unloading and save procedure added, commented out unused code from frontend
* bug fixes
Changed the image output to a gallery to display multiple items
Fixed results not showing up in output
Fixed RealESRGAN 2x mode not working and hard coded the default value for the reload.
* added GoBig model check
* added LDSR load check
* removed global statements, added model loader/unloader function
* fixed optimized mode
* update
* update
Added send to lab button
Added a print out if latent-diffusion folder isn't found
* brought back the fix faces and upscale in generation tab
* uncommenting img lab flag
* added LDSR instructions
* default imgProcessorTask set to false
* exposed LDSR settings to lab
users need to reclone the LDSR repo to use them.
* Update frontend.py
moving some stuff around to make them more coherent
* restored upscale and fix faces to img2img
* added notice section
* fixed gfpgan/upscaled pictures not showing in 2img interfaces
* send to lab button now sends info as well
* uncommented dimension info update
* added increment buttons to sampler for that k_euler_a action
* image lab settings toggle on and off with selection
* removed wip settings panel
* better model loading handling and removed increment buttons
* explaining
* disabled SD unloading in image lab upscaling with realesgan and face fix
* fixed a conflict with image lab
Co-authored-by: dr3amer <91037083+dr3am37@users.noreply.github.com>
Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>
This adds a text box to Image Lab that displays the metadata
of any PNG files dropped on it. Can be used to read the info
saved with --save-metadata
Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>
* added image lab
* first release
model loading/unloading and save procedure added, commented out unused code from frontend
* bug fixes
Changed the image output to a gallery to display multiple items
Fixed results not showing up in output
Fixed RealESRGAN 2x mode not working and hard coded the default value for the reload.
* added GoBig model check
* added LDSR load check
* removed global statements, added model loader/unloader function
* fixed optimized mode
* update
* update
Added send to lab button
Added a print out if latent-diffusion folder isn't found
* brought back the fix faces and upscale in generation tab
Co-authored-by: dr3amer <91037083+dr3am37@users.noreply.github.com>
Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>
* Implement masking during sampling to improve blending
- Almost inpainting-like behaviour
- Works best with small erased areas
- Denoiser strength to 1 results to completely in-paint with no previous image info
- Uncrop kind of sometimes works, but not really
- DDIM changes depend on a PR in stable-diffusion core
* Remove old init_masking code on save, as the masked image is applied during sampling
Co-authored-by: anon-hlhl <>
Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>