mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-11-27 06:40:10 +08:00
Prevent nans from failed float parsing from overwriting weights
This commit is contained in:
parent
6be32b31d1
commit
6d408c06c6
@ -25,6 +25,7 @@ addEventListener('keydown', (event) => {
|
||||
} else {
|
||||
end = target.value.slice(selectionEnd + 1).indexOf(")") + 1;
|
||||
weight = parseFloat(target.value.slice(selectionEnd + 1, selectionEnd + 1 + end));
|
||||
if (isNaN(weight)) return;
|
||||
if (event.key == minus) weight -= 0.1;
|
||||
if (event.key == plus) weight += 0.1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user