diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-28 09:24:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 09:24:40 +0300 |
commit | ce72af87d3b05c946bc82033786fc340f1c20512 (patch) | |
tree | e02a69bc9b18f36db76590bd6312320685901b5e /modules/generation_parameters_copypaste.py | |
parent | 0834d4ce374225131e025540220c727e352a3e43 (diff) | |
parent | 23a9d5e27390846dea0895a02c04aec9583a4d38 (diff) |
Merge pull request #7199 from maxaudron/feature/configurable-data-dir
Add flag to store user data sepperate from source code
Diffstat (limited to 'modules/generation_parameters_copypaste.py')
-rw-r--r-- | modules/generation_parameters_copypaste.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/generation_parameters_copypaste.py b/modules/generation_parameters_copypaste.py index 46e12dc6..773c5c0e 100644 --- a/modules/generation_parameters_copypaste.py +++ b/modules/generation_parameters_copypaste.py @@ -6,7 +6,7 @@ import re from pathlib import Path
import gradio as gr
-from modules.shared import script_path
+from modules.paths import data_path
from modules import shared, ui_tempdir, script_callbacks
import tempfile
from PIL import Image
@@ -289,7 +289,7 @@ Steps: 20, Sampler: Euler a, CFG scale: 7, Seed: 965400086, Size: 512x512, Model def connect_paste(button, paste_fields, input_comp, jsfunc=None):
def paste_func(prompt):
if not prompt and not shared.cmd_opts.hide_ui_dir_config:
- filename = os.path.join(script_path, "params.txt")
+ filename = os.path.join(data_path, "params.txt")
if os.path.exists(filename):
with open(filename, "r", encoding="utf8") as file:
prompt = file.read()
|