Skip to content

Commit 6629446

Browse files
committed
Merge branch 'master' into focal-point-cropping
2 parents 3e6c242 + 3e15f8e commit 6629446

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+4855
-1256
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Bug Report
2+
description: You think somethings is broken in the UI
3+
title: "[Bug]: "
4+
labels: ["bug-report"]
5+
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Is there an existing issue for this?
10+
description: Please search to see if an issue already exists for the bug you encountered, and that it hasn't been fixed in a recent build/commit.
11+
options:
12+
- label: I have searched the existing issues and checked the recent builds/commits
13+
required: true
14+
- type: markdown
15+
attributes:
16+
value: |
17+
*Please fill this form with as much information as possible, don't forget to fill "What OS..." and "What browsers" and *provide screenshots if possible**
18+
- type: textarea
19+
id: what-did
20+
attributes:
21+
label: What happened?
22+
description: Tell us what happened in a very clear and simple way
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: steps
27+
attributes:
28+
label: Steps to reproduce the problem
29+
description: Please provide us with precise step by step information on how to reproduce the bug
30+
value: |
31+
1. Go to ....
32+
2. Press ....
33+
3. ...
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: what-should
38+
attributes:
39+
label: What should have happened?
40+
description: tell what you think the normal behavior should be
41+
validations:
42+
required: true
43+
- type: input
44+
id: commit
45+
attributes:
46+
label: Commit where the problem happens
47+
description: Which commit are you running ? (copy the **Commit hash** shown in the cmd/terminal when you launch the UI)
48+
validations:
49+
required: true
50+
- type: dropdown
51+
id: platforms
52+
attributes:
53+
label: What platforms do you use to access UI ?
54+
multiple: true
55+
options:
56+
- Windows
57+
- Linux
58+
- MacOS
59+
- iOS
60+
- Android
61+
- Other/Cloud
62+
- type: dropdown
63+
id: browsers
64+
attributes:
65+
label: What browsers do you use to access the UI ?
66+
multiple: true
67+
options:
68+
- Mozilla Firefox
69+
- Google Chrome
70+
- Brave
71+
- Apple Safari
72+
- Microsoft Edge
73+
- type: textarea
74+
id: cmdargs
75+
attributes:
76+
label: Command Line Arguments
77+
description: Are you using any launching parameters/command line arguments (modified webui-user.py) ? If yes, please write them below
78+
render: Shell
79+
- type: textarea
80+
id: misc
81+
attributes:
82+
label: Additional information, context and logs
83+
description: Please provide us with any relevant additional info, context or log output.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: WebUI Community Support
4+
url: https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions
5+
about: Please ask and answer questions here.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Feature request
2+
description: Suggest an idea for this project
3+
title: "[Feature Request]: "
4+
labels: ["suggestion"]
5+
6+
body:
7+
- type: checkboxes
8+
attributes:
9+
label: Is there an existing issue for this?
10+
description: Please search to see if an issue already exists for the feature you want, and that it's not implemented in a recent build/commit.
11+
options:
12+
- label: I have searched the existing issues and checked the recent builds/commits
13+
required: true
14+
- type: markdown
15+
attributes:
16+
value: |
17+
*Please fill this form with as much information as possible, provide screenshots and/or illustrations of the feature if possible*
18+
- type: textarea
19+
id: feature
20+
attributes:
21+
label: What would your feature do ?
22+
description: Tell us about your feature in a very clear and simple way, and what problem it would solve
23+
validations:
24+
required: true
25+
- type: textarea
26+
id: workflow
27+
attributes:
28+
label: Proposed workflow
29+
description: Please provide us with step by step information on how you'd like the feature to be accessed and used
30+
value: |
31+
1. Go to ....
32+
2. Press ....
33+
3. ...
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: misc
38+
attributes:
39+
label: Additional information
40+
description: Add any other context or screenshots about the feature request here.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,6 @@ __pycache__
2727
notification.mp3
2828
/SwinIR
2929
/textual_inversion
30+
.vscode
31+
/extensions
32+

README.md

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
1111
- One click install and run script (but you still must install python and git)
1212
- Outpainting
1313
- Inpainting
14+
- Color Sketch
1415
- Prompt Matrix
1516
- Stable Diffusion Upscale
1617
- Attention, specify parts of text that the model should pay more attention to
@@ -23,6 +24,7 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
2324
- have as many embeddings as you want and use any names you like for them
2425
- use multiple embeddings with different numbers of vectors per token
2526
- works with half precision floating point numbers
27+
- train embeddings on 8GB (also reports of 6GB working)
2628
- Extras tab with:
2729
- GFPGAN, neural network that fixes faces
2830
- CodeFormer, face restoration tool as an alternative to GFPGAN
@@ -37,14 +39,14 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
3739
- Interrupt processing at any time
3840
- 4GB video card support (also reports of 2GB working)
3941
- Correct seeds for batches
40-
- Prompt length validation
41-
- get length of prompt in tokens as you type
42-
- get a warning after generation if some text was truncated
42+
- Live prompt token length validation
4343
- Generation parameters
4444
- parameters you used to generate images are saved with that image
4545
- in PNG chunks for PNG, in EXIF for JPEG
4646
- can drag the image to PNG info tab to restore generation parameters and automatically copy them into UI
4747
- can be disabled in settings
48+
- drag and drop an image/text-parameters to promptbox
49+
- Read Generation Parameters Button, loads parameters in promptbox to UI
4850
- Settings page
4951
- Running arbitrary python code from UI (must run with --allow-code to enable)
5052
- Mouseover hints for most UI elements
@@ -59,25 +61,56 @@ Check the [custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-web
5961
- CLIP interrogator, a button that tries to guess prompt from an image
6062
- Prompt Editing, a way to change prompt mid-generation, say to start making a watermelon and switch to anime girl midway
6163
- Batch Processing, process a group of files using img2img
62-
- Img2img Alternative
64+
- Img2img Alternative, reverse Euler method of cross attention control
6365
- Highres Fix, a convenience option to produce high resolution pictures in one click without usual distortions
6466
- Reloading checkpoints on the fly
65-
- Checkpoint Merger, a tab that allows you to merge two checkpoints into one
67+
- Checkpoint Merger, a tab that allows you to merge up to 3 checkpoints into one
6668
- [Custom scripts](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Custom-Scripts) with many extensions from community
6769
- [Composable-Diffusion](https://energy-based-model.github.io/Compositional-Visual-Generation-with-Composable-Diffusion-Models/), a way to use multiple prompts at once
6870
- separate prompts using uppercase `AND`
6971
- also supports weights for prompts: `a cat :1.2 AND a dog AND a penguin :2.2`
7072
- No token limit for prompts (original stable diffusion lets you use up to 75 tokens)
7173
- DeepDanbooru integration, creates danbooru style tags for anime prompts (add --deepdanbooru to commandline args)
7274
- [xformers](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Xformers), major speed increase for select cards: (add --xformers to commandline args)
75+
- via extension: [History tab](https://github.com/yfszzx/stable-diffusion-webui-images-browser): view, direct and delete images conveniently within the UI
76+
- Generate forever option
77+
- Training tab
78+
- hypernetworks and embeddings options
79+
- Preprocessing images: cropping, mirroring, autotagging using BLIP or deepdanbooru (for anime)
80+
- Clip skip
81+
- Use Hypernetworks
82+
- Use VAEs
83+
- Estimated completion time in progress bar
84+
- API
85+
- Support for dedicated [inpainting model](https://github.com/runwayml/stable-diffusion#inpainting-with-stable-diffusion) by RunwayML.
86+
- via extension: [Aesthetic Gradients](https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients), a way to generate images with a specific aesthetic by using clip images embds (implementation of [https://github.com/vicgalle/stable-diffusion-aesthetic-gradients](https://github.com/vicgalle/stable-diffusion-aesthetic-gradients))
87+
88+
## Where are Aesthetic Gradients?!?!
89+
Aesthetic Gradients are now an extension. You can install it using git:
90+
91+
```commandline
92+
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients extensions/aesthetic-gradients
93+
```
94+
95+
After running this command, make sure that you have `aesthetic-gradients` dir in webui's `extensions` directory and restart
96+
the UI. The interface for Aesthetic Gradients should appear exactly the same as it was.
97+
98+
## Where is History/Image browser?!?!
99+
Image browser is now an extension. You can install it using git:
100+
101+
```commandline
102+
git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser extensions/images-browser
103+
```
104+
105+
After running this command, make sure that you have `images-browser` dir in webui's `extensions` directory and restart
106+
the UI. The interface for Image browser should appear exactly the same as it was.
73107

74108
## Installation and Running
75109
Make sure the required [dependencies](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Dependencies) are met and follow the instructions available for both [NVidia](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs) (recommended) and [AMD](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs) GPUs.
76110

77-
Alternatively, use Google Colab:
111+
Alternatively, use online services (like Google Colab):
78112

79-
- [Colab, maintained by Akaibu](https://colab.research.google.com/drive/1kw3egmSn-KgWsikYvOMjJkVDsPLjEMzl)
80-
- [Colab, original by me, outdated](https://colab.research.google.com/drive/1Iy-xW9t1-OQWhb0hNxueGij8phCyluOh).
113+
- [List of Online Services](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Online-Services)
81114

82115
### Automatic Installation on Windows
83116
1. Install [Python 3.10.6](https://www.python.org/downloads/windows/), checking "Add Python to PATH"

extensions/put extensions here.txt

Whitespace-only changes.

javascript/aspectRatioOverlay.js

Lines changed: 22 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ let currentWidth = null;
33
let currentHeight = null;
44
let arFrameTimeout = setTimeout(function(){},0);
55

6-
function dimensionChange(e,dimname){
6+
function dimensionChange(e, is_width, is_height){
77

8-
if(dimname == 'Width'){
8+
if(is_width){
99
currentWidth = e.target.value*1.0
1010
}
11-
if(dimname == 'Height'){
11+
if(is_height){
1212
currentHeight = e.target.value*1.0
1313
}
1414

@@ -18,22 +18,13 @@ function dimensionChange(e,dimname){
1818
return;
1919
}
2020

21-
var img2imgMode = gradioApp().querySelector('#mode_img2img.tabs > div > button.rounded-t-lg.border-gray-200')
22-
if(img2imgMode){
23-
img2imgMode=img2imgMode.innerText
24-
}else{
25-
return;
26-
}
27-
28-
var redrawImage = gradioApp().querySelector('div[data-testid=image] img');
29-
var inpaintImage = gradioApp().querySelector('#img2maskimg div[data-testid=image] img')
30-
3121
var targetElement = null;
3222

33-
if(img2imgMode=='img2img' && redrawImage){
34-
targetElement = redrawImage;
35-
}else if(img2imgMode=='Inpaint' && inpaintImage){
36-
targetElement = inpaintImage;
23+
var tabIndex = get_tab_index('mode_img2img')
24+
if(tabIndex == 0){
25+
targetElement = gradioApp().querySelector('div[data-testid=image] img');
26+
} else if(tabIndex == 1){
27+
targetElement = gradioApp().querySelector('#img2maskimg div[data-testid=image] img');
3728
}
3829

3930
if(targetElement){
@@ -98,22 +89,20 @@ onUiUpdate(function(){
9889
var inImg2img = Boolean(gradioApp().querySelector("button.rounded-t-lg.border-gray-200"))
9990
if(inImg2img){
10091
let inputs = gradioApp().querySelectorAll('input');
101-
inputs.forEach(function(e){
102-
let parentLabel = e.parentElement.querySelector('label')
103-
if(parentLabel && parentLabel.innerText){
104-
if(!e.classList.contains('scrollwatch')){
105-
if(parentLabel.innerText == 'Width' || parentLabel.innerText == 'Height'){
106-
e.addEventListener('input', function(e){dimensionChange(e,parentLabel.innerText)} )
107-
e.classList.add('scrollwatch')
108-
}
109-
if(parentLabel.innerText == 'Width'){
110-
currentWidth = e.value*1.0
111-
}
112-
if(parentLabel.innerText == 'Height'){
113-
currentHeight = e.value*1.0
114-
}
115-
}
116-
}
92+
inputs.forEach(function(e){
93+
var is_width = e.parentElement.id == "img2img_width"
94+
var is_height = e.parentElement.id == "img2img_height"
95+
96+
if((is_width || is_height) && !e.classList.contains('scrollwatch')){
97+
e.addEventListener('input', function(e){dimensionChange(e, is_width, is_height)} )
98+
e.classList.add('scrollwatch')
99+
}
100+
if(is_width){
101+
currentWidth = e.value*1.0
102+
}
103+
if(is_height){
104+
currentHeight = e.value*1.0
105+
}
117106
})
118107
}
119108
});

javascript/dragdrop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function dropReplaceImage( imgWrap, files ) {
4343
window.document.addEventListener('dragover', e => {
4444
const target = e.composedPath()[0];
4545
const imgWrap = target.closest('[data-testid="image"]');
46-
if ( !imgWrap && target.placeholder.indexOf("Prompt") == -1) {
46+
if ( !imgWrap && target.placeholder && target.placeholder.indexOf("Prompt") == -1) {
4747
return;
4848
}
4949
e.stopPropagation();

0 commit comments

Comments
 (0)