aboutsummaryrefslogtreecommitdiff
path: root/modules/infotext_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/infotext_utils.py')
-rw-r--r--modules/infotext_utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/infotext_utils.py b/modules/infotext_utils.py
index e582ee47..6978a0bf 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)