diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-01 11:39:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-01 11:39:52 +0000 |
commit | 696c338ee2841830fd5010427d90347329d5786a (patch) | |
tree | 6f9c37f302e6bcaf1ce3e1f1913f2db54f3b184e /javascript/edit-attention.js | |
parent | b463b8a12672e010a8c86ea1c73b2c14ae5555d5 (diff) | |
parent | 50f63e22472dd532ddd76adb28f29aef46a71a86 (diff) | |
download | stable-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.js | 8 |
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;
|