aboutsummaryrefslogtreecommitdiffstats
path: root/javascript/edit-attention.js
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-05-01 11:39:52 +0000
committerGitHub <noreply@github.com>2023-05-01 11:39:52 +0000
commit696c338ee2841830fd5010427d90347329d5786a (patch)
tree6f9c37f302e6bcaf1ce3e1f1913f2db54f3b184e /javascript/edit-attention.js
parentb463b8a12672e010a8c86ea1c73b2c14ae5555d5 (diff)
parent50f63e22472dd532ddd76adb28f29aef46a71a86 (diff)
downloadstable-diffusion-webui-gfx803-696c338ee2841830fd5010427d90347329d5786a.tar.gz
stable-diffusion-webui-gfx803-696c338ee2841830fd5010427d90347329d5786a.tar.bz2
stable-diffusion-webui-gfx803-696c338ee2841830fd5010427d90347329d5786a.zip
Merge pull request #9953 from akx/js-misc-fixes
Miscellaneous JS fixes
Diffstat (limited to 'javascript/edit-attention.js')
-rw-r--r--javascript/edit-attention.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/javascript/edit-attention.js b/javascript/edit-attention.js
index 588c7b77..d2c2f190 100644
--- a/javascript/edit-attention.js
+++ b/javascript/edit-attention.js
@@ -69,8 +69,8 @@ function keyupEditAttention(event){
event.preventDefault();
- closeCharacter = ')'
- delta = opts.keyedit_precision_attention
+ var closeCharacter = ')'
+ var delta = opts.keyedit_precision_attention
if (selectionStart > 0 && text[selectionStart - 1] == '<'){
closeCharacter = '>'
@@ -91,8 +91,8 @@ function keyupEditAttention(event){
selectionEnd += 1;
}
- end = text.slice(selectionEnd + 1).indexOf(closeCharacter) + 1;
- weight = parseFloat(text.slice(selectionEnd + 1, selectionEnd + 1 + end));
+ var end = text.slice(selectionEnd + 1).indexOf(closeCharacter) + 1;
+ var weight = parseFloat(text.slice(selectionEnd + 1, selectionEnd + 1 + end));
if (isNaN(weight)) return;
weight += isPlus ? delta : -delta;