Skip to content

Commit c13e234

Browse files
authored
Merge branch 'master' into enable-override-hypernet
2 parents 55ca040 + 5302e2c commit c13e234

Some content is hidden

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

50 files changed

+2527
-723
lines changed

CODEOWNERS

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
* @AUTOMATIC1111
2-
/localizations/ar_AR.json @xmodar @blackneoo
3-
/localizations/de_DE.json @LunixWasTaken
4-
/localizations/es_ES.json @innovaciones
5-
/localizations/fr_FR.json @tumbly
6-
/localizations/it_IT.json @EugenioBuffo
7-
/localizations/ja_JP.json @yuuki76
8-
/localizations/ko_KR.json @36DB
9-
/localizations/pt_BR.json @M-art-ucci
10-
/localizations/ru_RU.json @kabachuha
11-
/localizations/tr_TR.json @camenduru
12-
/localizations/zh_CN.json @dtlnor @bgluminous
13-
/localizations/zh_TW.json @benlisquare
2+
3+
# if you were managing a localization and were removed from this file, this is because
4+
# the intended way to do localizations now is via extensions. See:
5+
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Developing-extensions
6+
# Make a repo with your localization and since you are still listed as a collaborator
7+
# you can add it to the wiki page yourself. This change is because some people complained
8+
# the git commit log is cluttered with things unrelated to almost everyone and
9+
# because I believe this is the best overall for the project to handle localizations almost
10+
# entirely without my oversight.
11+
12+

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,15 @@ The documentation was moved from this README over to the project's [wiki](https:
155155
- Swin2SR - https://github.com/mv-lab/swin2sr
156156
- LDSR - https://github.com/Hafiidz/latent-diffusion
157157
- Ideas for optimizations - https://github.com/basujindal/stable-diffusion
158-
- Doggettx - Cross Attention layer optimization - https://github.com/Doggettx/stable-diffusion, original idea for prompt editing.
159-
- InvokeAI, lstein - Cross Attention layer optimization - https://github.com/invoke-ai/InvokeAI (originally http://github.com/lstein/stable-diffusion)
160-
- Rinon Gal - Textual Inversion - https://github.com/rinongal/textual_inversion (we're not using his code, but we are using his ideas).
158+
- Cross Attention layer optimization - Doggettx - https://github.com/Doggettx/stable-diffusion, original idea for prompt editing.
159+
- Cross Attention layer optimization - InvokeAI, lstein - https://github.com/invoke-ai/InvokeAI (originally http://github.com/lstein/stable-diffusion)
160+
- Textual Inversion - Rinon Gal - https://github.com/rinongal/textual_inversion (we're not using his code, but we are using his ideas).
161161
- Idea for SD upscale - https://github.com/jquesnelle/txt2imghd
162162
- Noise generation for outpainting mk2 - https://github.com/parlance-zz/g-diffuser-bot
163163
- CLIP interrogator idea and borrowing some code - https://github.com/pharmapsychotic/clip-interrogator
164164
- Idea for Composable Diffusion - https://github.com/energy-based-model/Compositional-Visual-Generation-with-Composable-Diffusion-Models-PyTorch
165165
- xformers - https://github.com/facebookresearch/xformers
166166
- DeepDanbooru - interrogator for anime diffusers https://github.com/KichangKim/DeepDanbooru
167+
- Security advice - RyotaK
167168
- Initial Gradio script - posted on 4chan by an Anonymous user. Thank you Anonymous user.
168169
- (You)

javascript/edit-attention.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
addEventListener('keydown', (event) => {
22
let target = event.originalTarget || event.composedPath()[0];
3-
if (!target.hasAttribute("placeholder")) return;
4-
if (!target.placeholder.toLowerCase().includes("prompt")) return;
3+
if (!target.matches("#toprow textarea.gr-text-input[placeholder]")) return;
54
if (! (event.metaKey || event.ctrlKey)) return;
65

76

javascript/progressbar.js

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,21 @@ global_progressbars = {}
33
galleries = {}
44
galleryObservers = {}
55

6+
// this tracks laumnches of window.setTimeout for progressbar to prevent starting a new timeout when the previous is still running
7+
timeoutIds = {}
8+
69
function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_skip, id_interrupt, id_preview, id_gallery){
7-
var progressbar = gradioApp().getElementById(id_progressbar)
10+
// gradio 3.8's enlightened approach allows them to create two nested div elements inside each other with same id
11+
// every time you use gr.HTML(elem_id='xxx'), so we handle this here
12+
var progressbar = gradioApp().querySelector("#"+id_progressbar+" #"+id_progressbar)
13+
var progressbarParent
14+
if(progressbar){
15+
progressbarParent = gradioApp().querySelector("#"+id_progressbar)
16+
} else{
17+
progressbar = gradioApp().getElementById(id_progressbar)
18+
progressbarParent = null
19+
}
20+
821
var skip = id_skip ? gradioApp().getElementById(id_skip) : null
922
var interrupt = gradioApp().getElementById(id_interrupt)
1023

@@ -26,18 +39,26 @@ function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_skip
2639
global_progressbars[id_progressbar] = progressbar
2740

2841
var mutationObserver = new MutationObserver(function(m){
42+
if(timeoutIds[id_part]) return;
43+
2944
preview = gradioApp().getElementById(id_preview)
3045
gallery = gradioApp().getElementById(id_gallery)
3146

3247
if(preview != null && gallery != null){
3348
preview.style.width = gallery.clientWidth + "px"
3449
preview.style.height = gallery.clientHeight + "px"
50+
if(progressbarParent) progressbar.style.width = progressbarParent.clientWidth + "px"
3551

3652
//only watch gallery if there is a generation process going on
3753
check_gallery(id_gallery);
3854

3955
var progressDiv = gradioApp().querySelectorAll('#' + id_progressbar_span).length > 0;
40-
if(!progressDiv){
56+
if(progressDiv){
57+
timeoutIds[id_part] = window.setTimeout(function() {
58+
timeoutIds[id_part] = null
59+
requestMoreProgress(id_part, id_progressbar_span, id_skip, id_interrupt)
60+
}, 500)
61+
} else{
4162
if (skip) {
4263
skip.style.display = "none"
4364
}
@@ -47,13 +68,10 @@ function check_progressbar(id_part, id_progressbar, id_progressbar_span, id_skip
4768
if (galleryObservers[id_gallery]) {
4869
galleryObservers[id_gallery].disconnect();
4970
galleries[id_gallery] = null;
50-
}
71+
}
5172
}
52-
53-
5473
}
5574

56-
window.setTimeout(function() { requestMoreProgress(id_part, id_progressbar_span, id_skip, id_interrupt) }, 500)
5775
});
5876
mutationObserver.observe( progressbar, { childList:true, subtree:true })
5977
}

javascript/ui.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,4 +208,6 @@ function update_token_counter(button_id) {
208208
function restart_reload(){
209209
document.body.innerHTML='<h1 style="font-family:monospace;margin-top:20%;color:lightgray;text-align:center;">Reloading...</h1>';
210210
setTimeout(function(){location.reload()},2000)
211+
212+
return []
211213
}

launch.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def prepare_enviroment():
142142

143143
stable_diffusion_commit_hash = os.environ.get('STABLE_DIFFUSION_COMMIT_HASH', "69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc")
144144
taming_transformers_commit_hash = os.environ.get('TAMING_TRANSFORMERS_COMMIT_HASH', "24268930bf1dce879235a7fddd0b2355b84d7ea6")
145-
k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "f4e99857772fc3a126ba886aadf795a332774878")
145+
k_diffusion_commit_hash = os.environ.get('K_DIFFUSION_COMMIT_HASH', "60e5042ca0da89c14d1dd59d73883280f8fce991")
146146
codeformer_commit_hash = os.environ.get('CODEFORMER_COMMIT_HASH', "c5b4593074ba6214284d6acd5f1719b6c5d739af")
147147
blip_commit_hash = os.environ.get('BLIP_COMMIT_HASH', "48211a1594f1321b00f14c9f7a5b4813144b2fb9")
148148

@@ -238,12 +238,15 @@ def tests(argv):
238238
proc.kill()
239239

240240

241-
def start_webui():
242-
print(f"Launching Web UI with arguments: {' '.join(sys.argv[1:])}")
241+
def start():
242+
print(f"Launching {'API server' if '--nowebui' in sys.argv else 'Web UI'} with arguments: {' '.join(sys.argv[1:])}")
243243
import webui
244-
webui.webui()
244+
if '--nowebui' in sys.argv:
245+
webui.api_only()
246+
else:
247+
webui.webui()
245248

246249

247250
if __name__ == "__main__":
248251
prepare_enviroment()
249-
start_webui()
252+
start()

localizations/de_DE.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"None": "Nichts",
7171
"Prompt matrix": "Promptmatrix",
7272
"Prompts from file or textbox": "Prompts aus Datei oder Textfeld",
73-
"X/Y plot": "X/Y Graf",
73+
"X/Y plot": "X/Y Graph",
7474
"Put variable parts at start of prompt": "Variable teile am start des Prompt setzen",
7575
"Iterate seed every line": "Iterate seed every line",
7676
"List of prompt inputs": "List of prompt inputs",
@@ -455,4 +455,4 @@
455455
"Only applies to inpainting models. Determines how strongly to mask off the original image for inpainting and img2img. 1.0 means fully masked, which is the default behaviour. 0.0 means a fully unmasked conditioning. Lower values will help preserve the overall composition of the image, but will struggle with large changes.": "Gilt nur für Inpainting-Modelle. Legt fest, wie stark das Originalbild für Inpainting und img2img maskiert werden soll. 1.0 bedeutet vollständig maskiert, was das Standardverhalten ist. 0.0 bedeutet eine vollständig unmaskierte Konditionierung. Niedrigere Werte tragen dazu bei, die Gesamtkomposition des Bildes zu erhalten, sind aber bei großen Änderungen problematisch.",
456456
"List of setting names, separated by commas, for settings that should go to the quick access bar at the top, rather than the usual setting tab. See modules/shared.py for setting names. Requires restarting to apply.": "Liste von Einstellungsnamen, getrennt durch Kommas, für Einstellungen, die in der Schnellzugriffsleiste oben erscheinen sollen, anstatt in dem üblichen Einstellungs-Tab. Siehe modules/shared.py für Einstellungsnamen. Erfordert einen Neustart zur Anwendung.",
457457
"If this values is non-zero, it will be added to seed and used to initialize RNG for noises when using samplers with Eta. You can use this to produce even more variation of images, or you can use this to match images of other software if you know what you are doing.": "Wenn dieser Wert ungleich Null ist, wird er zum Seed addiert und zur Initialisierung des RNG für Noise bei der Verwendung von Samplern mit Eta verwendet. Dies kann verwendet werden, um noch mehr Variationen von Bildern zu erzeugen, oder um Bilder von anderer Software zu erzeugen, wenn Sie wissen, was Sie tun."
458-
}
458+
}

0 commit comments

Comments
 (0)