Merge pull request #1212 from sd-webui/master

Changes from master that are not in dev
This commit is contained in:
hlky 2022-09-18 14:19:02 +01:00 committed by GitHub
commit ab0c942560
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 12 deletions

16
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,16 @@
# Description
Please include:
* relevant motivation
* a summary of the change
* which issue is fixed.
* any additional dependencies that are required for this change.
Closes: # (issue)
# Checklist:
- [ ] I have changed the base branch to `dev`
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation

View File

@ -1,8 +1,6 @@
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/altryne/sd-webui-colab/blob/main/Stable_Diffusion_WebUi_Altryne.ipynb) # [Visit sd-webui's Discord Server](https://discord.gg/gyXNe4NySY) [![Discord Server](https://user-images.githubusercontent.com/5977640/190528254-9b5b4423-47ee-4f24-b4f9-fd13fba37518.png)](https://discord.gg/gyXNe4NySY)
[Visit Our Discord Server](https://discord.gg/gyXNe4NySY) [![Discord Server](https://user-images.githubusercontent.com/5977640/190528254-9b5b4423-47ee-4f24-b4f9-fd13fba37518.png)](https://discord.gg/gyXNe4NySY) # Installation instructions for [Windows](https://github.com/sd-webui/stable-diffusion-webui/wiki/Installation), [Linux](https://github.com/sd-webui/stable-diffusion-webui/wiki/Linux-Automated-Setup-Guide)
# Installation instructions for [Windows](https://github.com/sd-webui/stable-diffusion-webui/wiki/Installation), [Linux](https://github.com/sd-webui/stable-diffusion-webui/wiki/Linux-Automated-Setup-Guide), or [Google Colab](https://colab.research.google.com/github/altryne/sd-webui-colab/blob/main/Stable_Diffusion_WebUi_Altryne.ipynb)
### Have an **issue**? ### Have an **issue**?
@ -11,9 +9,17 @@
### Want to contribute? ### Want to contribute?
Open new Pull Requests against `dev` branch! Gradio version (stable)
**If you're thinking about adding a new feature to Web UI focus on the Streamlit version (webui_streamlit.py) which is in active development.** Open new Pull Requests on `dev` branch!
for Gradio check out the [docs](https://gradio.app/docs/) to contribute
Have an issue or feature request with Gradio? open a issue/feature request on github for support: https://github.com/gradio-app/gradio/issues
Need more support with Gradio? We have a discord channel called `gradio-stable-diffusion` for Q&A with the gradio authors, to join use this link https://discord.gg/Qs8AsnX7Jd, then go to `role-assignment` and click gradio to join the `gradio` channels.
**New features can be added to Gradio or Streamlit versions**
## More documentation about features, troubleshooting, common issues very soon ## More documentation about features, troubleshooting, common issues very soon
### Want to help with documentation? Documented something? Use [Discussions](https://github.com/sd-webui/stable-diffusion-webui/discussions) ### Want to help with documentation? Documented something? Use [Discussions](https://github.com/sd-webui/stable-diffusion-webui/discussions)
@ -70,10 +76,18 @@ Original script with Gradio UI was written by a kind anonymous user. This is a m
![](https://github.com/sd-webui/stable-diffusion-webui/blob/master/images/gfpgan.jpg) ![](https://github.com/sd-webui/stable-diffusion-webui/blob/master/images/gfpgan.jpg)
![](https://github.com/sd-webui/stable-diffusion-webui/blob/master/images/esrgan.jpg) ![](https://github.com/sd-webui/stable-diffusion-webui/blob/master/images/esrgan.jpg)
### Additional Models ### GFPGAN
**GFPGAN**, **RealESRGAN** and **LDSR** optional models are supported. Detailed download instructios is available in the wiki [wiki](https://github.com/sd-webui/stable-diffusion-webui/wiki/Installation#optional-additional-models). If you want to use GFPGAN to improve generated faces, you need to install it separately.
Please ensure that you run `webui.cmd` OR `webui_streamlit.cmd` **first** before downloading and initializing `/stable-diffusion-webui/src` folder. Download [GFPGANv1.3.pth](https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth) and put it
into the `/stable-diffusion-webui/src/gfpgan/experiments/pretrained_models` directory.
### RealESRGAN
Download [RealESRGAN_x4plus.pth](https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth) and [RealESRGAN_x4plus_anime_6B.pth](https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.4/RealESRGAN_x4plus_anime_6B.pth).
Put them into the `stable-diffusion-webui/src/realesrgan/experiments/pretrained_models` directory.
### LDSR
* Download **LDSR** [project.yaml](https://heibox.uni-heidelberg.de/f/31a76b13ea27482981b4/?dl=1) and [ model last.cpkt](https://heibox.uni-heidelberg.de/f/578df07c8fc04ffbadf3/?dl=1). Rename last.ckpt to model.ckpt and place both under stable-diffusion-webui/src/latent-diffusion/experiments/pretrained_models/
### Web UI ### Web UI

View File

@ -32,7 +32,7 @@ dependencies:
- omegaconf==2.1.1 - omegaconf==2.1.1
- opencv-python-headless==4.6.0.66 - opencv-python-headless==4.6.0.66
- pandas==1.4.3 - pandas==1.4.3
- piexif==1.1.3 - piexif==1.1.3
- pudb==2019.2 - pudb==2019.2
- pynvml==11.4.1 - pynvml==11.4.1
- python-slugify>=6.1.2 - python-slugify>=6.1.2

View File

@ -213,7 +213,7 @@ def draw_gradio_ui(opt, img2img=lambda x: x, txt2img=lambda x: x, imgproc=lambda
value=img2img_mask_modes[img2img_defaults['mask_mode']], value=img2img_mask_modes[img2img_defaults['mask_mode']],
visible=True) visible=True)
img2img_mask_restore = gr.Checkbox(label="Only modify regenerated parts of image", img2img_mask_restore = gr.Checkbox(label="Only modify regenerated parts of image",
value=img2img_defaults['mask_restore'], value=img2img_defaults['mask_restore'],
visible=True) visible=True)

View File

@ -1839,7 +1839,7 @@ prompt_parser = re.compile("""
(?: # non-capture group (?: # non-capture group
:+ # match one or more ':' characters :+ # match one or more ':' characters
(?P<weight> # capture group for 'weight' (?P<weight> # capture group for 'weight'
-?\d+(?:\.\d+)? # match positive or negative integer or decimal number -?\d*\.{0,1}\d+ # match positive or negative integer or decimal number
)? # end weight capture group, make optional )? # end weight capture group, make optional
\s* # strip spaces after weight \s* # strip spaces after weight
| # OR | # OR