diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-10 14:55:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-10 14:55:31 +0000 |
commit | 458eda13211ac3498485f1e5154d90808fbcfb60 (patch) | |
tree | 7a107ee536ca30c0036977a2bc92533a8ed4b597 /modules/ui_loadsave.py | |
parent | 9af5cce4c7c6681bd8dd639e5647cc8d0f71cf2c (diff) | |
parent | a75d756a6fc3a9d66d3c1601d5b8aafcbcd57bde (diff) | |
download | stable-diffusion-webui-gfx803-458eda13211ac3498485f1e5154d90808fbcfb60.tar.gz stable-diffusion-webui-gfx803-458eda13211ac3498485f1e5154d90808fbcfb60.tar.bz2 stable-diffusion-webui-gfx803-458eda13211ac3498485f1e5154d90808fbcfb60.zip |
Merge pull request #12456 from AUTOMATIC1111/patch-#12453
Patch #12453
Diffstat (limited to 'modules/ui_loadsave.py')
-rw-r--r-- | modules/ui_loadsave.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/ui_loadsave.py b/modules/ui_loadsave.py index a96c71b2..9a40cf4f 100644 --- a/modules/ui_loadsave.py +++ b/modules/ui_loadsave.py @@ -48,13 +48,13 @@ class UiLoadsave: elif condition and not condition(saved_value):
pass
else:
- if isinstance(x, gr.Textbox) and field == 'value': # due to an undersirable behavior of gr.Textbox, if you give it an int value instead of str, everything dies
+ if isinstance(x, gr.Textbox) and field == 'value': # due to an undesirable behavior of gr.Textbox, if you give it an int value instead of str, everything dies
saved_value = str(saved_value)
elif isinstance(x, gr.Number) and field == 'value':
try:
saved_value = float(saved_value)
except ValueError:
- saved_value = -1
+ return
setattr(obj, field, saved_value)
if init_field is not None:
|