* 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
* Metadata cleanup - Maintain metadata within UI
This commit, when combined with Gradio 3.2.1b1+, maintains image
metadata as an image is passed throughout the UI. For example,
if you generate an image, send it to Image Lab, upscale it, fix faces,
and then drag the resulting image back in to Image Lab, it will still
remember the image generation parameters.
When the image is saved, the metadata will be stripped from it if
save-metadata is not enabled. If the image is saved by *dragging*
out of the UI on to the filesystem it may maintain its metadata.
Note: I have ran into UI responsiveness issues with upgrading Gradio.
Seems there may be some Gradio queue management issues. *Without* the
gradio update this commit will maintain current functionality, but
will not keep meetadata when dragging an image between UI components.
* Move ImageMetadata into its own file
Cleans up webui, enables webui_streamlit et al to use it as well.
* Fix typo
Displays the current device info at the bottom of the page.
For users who run multiple instances of `sd-webui` on the same system (for multiple GPUs), it helps to know which of the active `CUDA_VISIBLE_DEVICES` is being used.
* 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>
* Add max-jobs command line argument
Adds a new command line argument, max-jobs, which will set the number
of concurrent jobs the gradio queue will allow. When set to more than
the default of 1 the gradio UI will be able to process additional
UI commands at the same time.
* JobManager: initial txt2img implementation
Initial implementation of JobManager, applied to txt2img.
Adds 'refresh' and 'cancel' buttons to the UI. These are useful when
generating images with large batch counts. The 'refresh' button will
update the gallery with the currently-generated images, and the cancel
button will cause the generation to stop after the current iteration.
The new job manager can be disabled with the parameter
--no-job-manager
* JobManager: Add status update text
* JobManager: Replace wrapped inputs as well
* JobManager: Per-session unique keys
* JobManager: Pre and Post call funcs, UI updates
Added pre- and post- function call 'dummy objects' to allow updating
the UI before and after a generate run. Update the visuals of the
buttons and status text in these new functions.
* JobManager: enforce maximum jobs
* JobManager: Move 'call' func code block
It just makes more sense between _pre and _post.
* JobManager: Add session management
Adds support for multiple browser sessions.
A single session cannot run the same job twice.
If there are no available jobs when Generate is clicked, the
generation aborts. It does *not* queue.
* JobManager: add session maintenance
Addded the ability for one session to stop all concurrent sessions,
and to free memory from any 'finished' sessions for which the
browser has been closed (as the images will be stored until the
browser does a final 'refresh' after the job finishes, which will
never happen if the browser closed)
* JobManager: Add img2img support
This *should* add JobManager to img2img, but it is untested
since img2img is broken for me even without my changes.
* Fixed img2img functionality on this pr
* Revert "Fixed img2img functionality on this pr"
This reverts commit 649b1e8e65.
* Img2Img: Fix 'image editor' options not visible
* Fix Img2Img Job Manager integration
* Img2Img UI: Move JobManager above Image Actions
It is helpful if it is on the screen when you hit generate, so
you can notice the button light up when generation starts.
* Improve job status text
* JobManager: Free available job on exception
* JobManager: Add queueing
Adds a simple queueing system to JobManager. If max-jobs concurrent
jobs are already active then any subsequent jobs will block until
a slot frees up.
Note: The UI does not give great feedback to this. The JobManager
status box will say "Loading..."
* JobManager: Fix queue accidentally LIFO
Queues should really be first in, first out.
* JobManager: add draw_gradio_ui function
Reduces a lot of boilerplate code in frontend.py
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>
* Merge with master
* params in prompt WIP
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
* Added highligted text output, added copy and pastable dynamic params
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
* Fixes with working repo
Signed-off-by: altryne <altryne@gmail.com>
* some fixes
Signed-off-by: Alex Volkov <alex.volkov@fundbox.com>
Signed-off-by: altryne <altryne@gmail.com>
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
Co-authored-by: dr3amer <91037083+dr3am37@users.noreply.github.com>
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
Co-authored-by: dr3amer <91037083+dr3am37@users.noreply.github.com>
Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>
* refactor js interface
* rename call_SD to call_JS
* add invocation example to call_JS
* serialize args before passing them to js
* allow override of x
* decouple python from js
* bring the painterro btn back
* refactor painterro code
replicate 7ddbd6533a as close as possible
* improve reliability
* fix big brain import
Co-authored-by: hlky <106811348+hlky@users.noreply.github.com>