diff options
Diffstat (limited to 'modules/infotext_utils.py')
-rw-r--r-- | modules/infotext_utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/infotext_utils.py b/modules/infotext_utils.py index a21329e6..9a02cdf2 100644 --- a/modules/infotext_utils.py +++ b/modules/infotext_utils.py @@ -453,9 +453,11 @@ def connect_paste(button, paste_fields, input_comp, override_settings_component, def paste_func(prompt):
if not prompt and not shared.cmd_opts.hide_ui_dir_config:
filename = os.path.join(data_path, "params.txt")
- if os.path.exists(filename):
+ try:
with open(filename, "r", encoding="utf8") as file:
prompt = file.read()
+ except OSError:
+ pass
params = parse_generation_parameters(prompt)
script_callbacks.infotext_pasted_callback(prompt, params)
|