Commit Graph

274 Commits

Author SHA1 Message Date
ZeroCool940711
1117b5604a -Added the Update Image Preview option to be part of the current tab options under Preview Settings.
- Added Dynamic Preview Frequency option for the txt2vid tab which tries to find the lowest value for update_preview_frequency at which we can update the preview image during generation while at the same time minimizing the impact it has in performance.
- Added option to save a video file on the outputs/txt2vid-samples folder after the generation is complete similar to how the save_grid option works on other tabs.
- Added a video preview which shows a video on the txt2vid tab when the generation is completed.
- Formated some lines of code to make it use less space and fit on the a single screen.
- Added a script called Settings.py to the script folder in which Settings for the Setting page will be placed. Empty for now.
2022-09-12 11:44:00 -07:00
Thomas Mello
08bbbf7d6d
Merge pull request #1035 from raefu/negative-prompt-dev
support negative prompts separated by ###
2022-09-12 20:28:41 +03:00
Brian Semrau
224bbdf8d6 Add comments crediting code authors. (probably not enough, but better than none) 2022-09-12 10:26:01 -04:00
ZeroCool
ba63fd7004
Merge pull request #1040 from briansemrau/feature/st-img2img-masking
Add masking to streamlit img2img
2022-09-12 00:24:59 -07:00
Brian Semrau
1089ec1162 add masking to streamlit img2img, find_noise_for_image, matched_noise 2022-09-12 03:02:43 -04:00
ZeroCool940711
9c8ac62b3d Fixed an error with the metadata not able to be saved because of the seed was not converted to a string before so it had no attribute encode on it. 2022-09-11 23:57:29 -07:00
ZeroCool940711
36a1551465 - Added code for @Hafiidz's changes made on the css. 2022-09-11 23:11:42 -07:00
Rae Fu
2124b7208f support negative prompts separated by ###
e.g. "shopping mall ### people" will try to generate an image of a mall
without people in it.
2022-09-11 14:51:20 -06:00
M
9f8a7a61ad
webui: add prompt output to console (#1031)
* webui: add prompt output to console

show the user what prompt is currently being rendered

* fix prompt print location
2022-09-11 22:21:38 +03:00
ZeroCool
cf924ca11f
Merge branch 'sd-webui:dev' into dev 2022-09-11 10:43:01 -07:00
ZeroCool940711
20172d381e Multiple improvements to the txt2vid tab.
- Improved txt2vid speed by 2 times.
- Added DDIM scheduler.
- Added sliders for beta_start and beta_end to have more control over these parameters on the scheduler.
- Added option to select the scheduler type from scaled_linear or linear.
- Added option to save info files for the txt2vid tab and improved the information saved to include most of the parameters used to run the generation.
- You can now download any model from the huggingface website to use on the txt2vid tab, just add the name to the custom_models_list on the config file.
2022-09-11 10:42:17 -07:00
oc013
8a8b993fd5
Add missing comma for nsfw toggle in img2img (#1028) 2022-09-11 20:18:17 +03:00
M
a98753cf10
webui: display the GPU in use during startup (#994)
* webui: display the GPU in use during startup

tell the user which GPU the code is actually going to use before spending lots of time loading everything onto the GPU

* typo

* add some info messages

* evaluate current GPU properly

* add debug flag gating

not everyone wants or needs to see debug messages :)

* add in stray debug msg
2022-09-11 14:47:34 +03:00
ZeroCool940711
e6463e3249 Added some basic layout for the Model Manager tab and added there the models that most people use to make it easy to download instead of having to go do the wiki or searching through discord for links, it also shows the path where you are supposed to put those models for them to work. 2022-09-11 03:35:14 -07:00
Mr. Gecko
69d6e53474
Add NSFW filter to avoid unexpected (#955)
* Add NSFW filter to avoid unexpected

* Fix img2img configuration numbering
2022-09-11 12:32:36 +03:00
JJ
42cc7ea8dc fix individual image file format saves
* introduces a general config setting save_format similar to grid_format for individual file saves
2022-09-11 17:40:28 +10:00
JJ
2672743f67 write same metadata to file and yaml
* include piexif in environment needed for exif labelling of non-png files
2022-09-11 17:27:52 +10:00
ZeroCool
a760e036d9
Commented an import that is not used for now but will be used soon. 2022-09-10 21:31:42 -07:00
ZeroCool940711
fa08f00ae6 Changed the minimum value for the Sampling Steps and Inference Steps to 10 and added step with a value of 10 to make it easier to move the slider as it will require a higher maximum value than in other tabs for good results on the text2vid tab. 2022-09-10 21:24:22 -07:00
ZeroCool
be2ece0683
Merge pull request #959 from jjisnow/new_metadata
New metadata for other image types
2022-09-10 19:11:32 -07:00
ZeroCool
c3cde0b661
Merge pull request #990 from jjisnow/img2img-defaults
add sampler_name defaults to img2img
2022-09-10 19:10:10 -07:00
M
20adc46b75
webui: detect scoped-down GPU environment (#993)
* webui: detect scoped-down GPU environment

check if we're using a scoped-down GPU environment (pynvml does not listen to CUDA_VISIBLE_DEVICES) so that we can measure memory on the correct GPU

* remove unnecessary import
2022-09-11 04:41:29 +03:00
JJ
8e7959ca2b add metadata to other file output file types 2022-09-11 09:49:14 +10:00
JJ
b4db9733d0 add sampler_name defaults to img2img 2022-09-11 09:37:14 +10:00
Thomas Mello
d6f4796c35
fix: sampler name in GoBig #988 2022-09-11 01:52:51 +03:00
node7-ai
2236e8b585
fix: sampler name in GoBig 2022-09-11 01:48:11 +03:00
xaedes
008af2d8ff
Perform masked image restoration for GFPGAN, RealESRGAN, fixing #947
* Perform masked image restoration when using GFPGAN or RealESRGAN, fixing #947.
Also fixes bug in image display when using masked image restoration with RealESRGAN.

When the image is upscaled using RealESRGAN the image restoration can not use the
original image because it has wrong resolution. In this case the image restoration
will restore the non-regenerated parts of the image with an RealESRGAN upscaled
version of the original input image.

Modifications from GFPGAN or color correction in (un)masked parts are also restored
to the original image by mask blending.

* Update scripts/webui.py

Co-authored-by: Thomas Mello <work.mello@gmail.com>
2022-09-10 18:37:42 +03:00
ZeroCool
24ddbdc811
Merge branch 'sd-webui:dev' into dev 2022-09-10 07:42:59 -07:00
ZeroCool940711
80b00810ef - Improved the progress bar for the txt2vid tab, it now shows more information during generation.
- Changed the guidance_scale variable to be cfg_scale.
2022-09-10 07:42:20 -07:00
ZeroCool940711
527d18e1c6 Added two new scripts that will be used for the new implementation of the txt2vid tab which uses the latest version of the diffusers library. 2022-09-10 07:38:57 -07:00
Soul-Burn
3e9cdb1dcb Better support for large batches in optimized mode 2022-09-10 15:25:13 +01:00
ZeroCool940711
2795dfb8ab Changed the scheduler for the txt2vid tab back to LMS, for now we can only use that. 2022-09-09 19:51:28 -07:00
ZeroCool940711
f5df32efb7 Removed old files from a split test we deed that are not needed anymore, we plan to do the split differently. 2022-09-09 19:47:43 -07:00
ZeroCool940711
249e2dd74f Fixed an issue with the txt2vid model. 2022-09-09 19:43:51 -07:00
Thomas Mello
f8a6a4eba8
fix: lost imports from #921 2022-09-10 01:54:19 +03:00
Michael Hearn
002dca063d Image transparency is used as mask for inpainting 2022-09-09 18:28:40 -04:00
xaedes
07062941c7
add img2img option for color correction. (#936)
color correction is already used for loopback to prevent color drift with the first image as correction target.
the option allows to use the color correction even without loopback mode.
it helps keeping the colors similar to the input image.
2022-09-10 00:44:30 +03:00
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
Thomas Mello
16d2941619
fix: filename format parameter (#923) 2022-09-09 22:11:57 +03:00
VulumeCode
1422b35ac6
Tiling parameter (#911)
* tiling

* default to False
2022-09-09 20:33:04 +03:00
Michoko
4d76d6742c
Add filename formatting argument (#908)
* Update webui.py

Filename formatting argument

* Update scripts/webui.py

Co-authored-by: Thomas Mello <work.mello@gmail.com>
2022-09-09 20:20:59 +03:00
cobryan05
9d95449624
Metadata cleanup - Maintain metadata within UI (#845)
* 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
2022-09-09 19:27:21 +03:00
Logan zoellner
754e530d70 when in outcrop mode, mask added regions and fill in with voroni noise for better outpainting 2022-09-09 10:13:38 -04:00
ZeroCool940711
61b3ca7014 Merge remote-tracking branch 'origin/dev' into dev 2022-09-09 03:44:25 -07:00
ZeroCool940711
22b84afc87 Improvements to the txt2vid tab. 2022-09-09 03:30:43 -07:00
Tony Beeman
7d987cc922 Add info and stats to img2img 2022-09-09 01:33:28 -07:00
Tony Beeman
28d8827331 Display Info and Stats when render is complete, similar to what Gradio shows. 2022-09-09 01:33:28 -07:00
Tony Beeman
771a68e3e5 Fixed the path in webui_streamlit.py 2022-09-09 01:03:34 -07:00
Tony Beeman
ca8ee265cd Made sure img2txt and img2img checkboxes respect YAML defaults 2022-09-08 23:50:33 -07:00
Tony Beeman
5ea27f3d0c Streamlit: Allow user defaults to be specified in a userconfig_streamlit.yaml file. 2022-09-08 22:58:25 -07:00
hlky
5a10bdbd47
proposed streamlit code organization changes
I want people of all skill levels to be able to contribute
This is one way the code could be split up with the aim of making it easy to understand and contribute especially for people on the lower end of the skill spectrum
All i've done is split things, I think renaming and reorganising is still needed
2022-09-08 17:57:38 +01:00
ZeroCool940711
e6027fe306 Added num_inference_steps to config file and fixed incorrectly calls to the config file from the txt2vid tab calling txt2img instead. 2022-09-08 05:51:22 -07:00
ZeroCool940711
ed84e1f1d8 - Added option to select custom models instead of just using the default one, if you want to use a custom model just place your .ckpt file in "models/custom" and the UI will detect it and let you switch between stable diffusion and your custom model, make sure to give the filename a proper name that is easy to distinguish from other models because that name will be used on the UI.
- Implemented basic Text To Video tab, will continue to improve it as it is really basic right now.
- Improved the model loading, you now should see less frequently errors about it not been loaded correctly.
2022-09-08 05:33:45 -07:00
hlky
a00d827cd8
Dev merge (#819)
* #715 #699 #698 #663 #625 #617 #611 #604 (#716)

* Update README.md

* Add sampler name to metadata (#695)

Co-authored-by: EliEron <example@example.com>

* old-dev-merge

Co-authored-by: EliEron <subanimehd@gmail.com>
Co-authored-by: EliEron <example@example.com>

* img2img-fix (#717)

* Revert "img2img-fix (#717)"

This reverts commit 70d4b1ca2a.

* img2img fixes

* Revert "img2img fixes"

This reverts commit e66eddc621.

* Revert "Revert "img2img-fix (#717)""

This reverts commit bf08b617d4.

* img2img fixed

* - Removed duplicated calls to save_sample.
- Change variables and arguments to be more self-explanatory and easier to understand what they do.

* Moved streamlit files to their proper location, before they were incorrectly added to the repository root folder.

* Added retry dependency for the streamlit version.

* Added .cmd file for easy running and updating the streamlit version of the UI.

* Removed duplicated entry for streamlit on the environment.yaml file.

* Removed some unnecessary lines from the the webui_streamlit.cmd file.

* add gfpgan folder to gitignore, auto gen by imglab

* added placeholder text similar to gradio

* added auto conversion for 4 channel PNG to RGB

* fix: regex escape characters

* Update Readme links to sd-webui when appropriate (#781)

* Update link to sd-webui when appropriate

* added LDSR instruction per devilismyfriend guide

* fix: stack overflow during recursion call (#784)

* Added option to set default sampler name from config file, will be useful for those wanting to change the default sampler and  have it persist even when closing the UI and opening it again.

* Added try and except block to handle basic errors like StopException which is raised by streamlit when you hit the stop button and KeyError which happens also when stopping the generation because it tries to check the model at the end which is not loaded at that time, this can be ignored and so thats the reason for the exception.

* separate css to external file

* Added "git pull" and "git stash" to the commands run by the cmd scripts when launching the UI, this should make it so people who use it can automatically update the code from the repo and be up to date without manually using those commands everytime.

* resolve conflict with master

Co-authored-by: EliEron <subanimehd@gmail.com>
Co-authored-by: EliEron <example@example.com>
Co-authored-by: ZeroCool <ZeroCool940711@users.noreply.github.com>
Co-authored-by: ZeroCool940711 <alejandrogilelias940711@gmail.com>
Co-authored-by: Hafiidz <3688500+Hafiidz@users.noreply.github.com>
Co-authored-by: Thomas Mello <work.mello@gmail.com>
2022-09-08 11:41:04 +01:00
Hafiidz
0e30d4fdd9 separate css to external file 2022-09-08 10:10:03 +08:00
ZeroCool940711
c0e02742e3 Added try and except block to handle basic errors like StopException which is raised by streamlit when you hit the stop button and KeyError which happens also when stopping the generation because it tries to check the model at the end which is not loaded at that time, this can be ignored and so thats the reason for the exception. 2022-09-07 18:03:39 -07:00
ZeroCool940711
1d4351ce91 Added option to set default sampler name from config file, will be useful for those wanting to change the default sampler and have it persist even when closing the UI and opening it again. 2022-09-07 16:58:19 -07:00
hlky
490bbbc103
Img2img dev (#736)
* #715 #699 #698 #663 #625 #617 #611 #604 (#716)

* Update README.md

* Add sampler name to metadata (#695)

Co-authored-by: EliEron <example@example.com>

* old-dev-merge

Co-authored-by: EliEron <subanimehd@gmail.com>
Co-authored-by: EliEron <example@example.com>

* img2img-fix (#717)

* Revert "img2img-fix (#717)"

This reverts commit 70d4b1ca2a.

* img2img fixes

* Revert "img2img fixes"

This reverts commit e66eddc621.

* Revert "Revert "img2img-fix (#717)""

This reverts commit bf08b617d4.

* img2img fixed

* feat: bring back Crop mode, formatting

Co-authored-by: EliEron <subanimehd@gmail.com>
Co-authored-by: EliEron <example@example.com>
Co-authored-by: Thomas Mello <work.mello@gmail.com>
2022-09-07 20:19:00 +01:00
Thomas Mello
a81671d673
fix: stack overflow during recursion call (#784) 2022-09-07 22:14:46 +03:00
Thomas Mello
388a765162 fix: regex escape characters 2022-09-07 18:05:16 +03:00
Hafiidz
432ebdad29 added auto conversion for 4 channel PNG to RGB 2022-09-07 14:29:49 +08:00
Hafiidz
03a3c149ba added placeholder text similar to gradio 2022-09-07 13:32:23 +08:00
ZeroCool
ed2daf81ba
Merge branch 'sd-webui:dev' into dev 2022-09-06 20:21:05 -07:00
ZeroCool940711
5b79864d43 Moved streamlit files to their proper location, before they were incorrectly added to the repository root folder. 2022-09-06 20:20:29 -07:00
hlky
38737341da
Merge branch 'master' into dev 2022-09-07 03:09:33 +01:00
hlky
3b490df708
img2img fixed 2022-09-07 03:08:29 +01:00
hlky
cf754f9fe6
Revert "Revert "img2img-fix (#717)""
This reverts commit bf08b617d4.
2022-09-07 02:56:27 +01:00
hlky
06df5a5697
Revert "img2img fixes"
This reverts commit e66eddc621.
2022-09-07 02:56:23 +01:00
hlky
e66eddc621
img2img fixes 2022-09-07 02:35:01 +01:00
hlky
bf08b617d4
Revert "img2img-fix (#717)"
This reverts commit 70d4b1ca2a.
2022-09-07 01:45:15 +01:00
hlky
70d4b1ca2a
img2img-fix (#717) 2022-09-07 00:48:13 +01:00
hlky
f28255466b
#715 #699 #698 #663 #625 #617 #611 #604 (#716)
* Update README.md

* Add sampler name to metadata (#695)

Co-authored-by: EliEron <example@example.com>

* old-dev-merge

Co-authored-by: EliEron <subanimehd@gmail.com>
Co-authored-by: EliEron <example@example.com>
2022-09-07 00:43:51 +01:00
EliEron
d86e945ca2
Add sampler name to metadata (#695)
Co-authored-by: EliEron <example@example.com>
2022-09-07 00:33:47 +01:00
hlky
010b27ce9a
Repo merge (#712)
* repo-merge

* cutdown size

* Create setup.py

* webui.cmd

* ldm

* Update environment.yaml

* Update environment.yaml
2022-09-06 23:50:14 +01:00