diff --git a/ui/easydiffusion/app.py b/ui/easydiffusion/app.py
index 8e317d83..e3de614d 100644
--- a/ui/easydiffusion/app.py
+++ b/ui/easydiffusion/app.py
@@ -5,7 +5,7 @@ import shutil
import socket
import sys
import traceback
-import shlex
+import copy
from ruamel.yaml import YAML
import urllib
@@ -102,7 +102,6 @@ def init_render_threads():
update_render_threads()
-
def getConfig(default_val=APP_CONFIG_DEFAULTS):
config_yaml_path = os.path.join(CONFIG_DIR, "..", "config.yaml")
@@ -111,6 +110,11 @@ def getConfig(default_val=APP_CONFIG_DEFAULTS):
if os.path.isfile(config_legacy_yaml):
shutil.move(config_legacy_yaml, config_yaml_path)
+ def set_config_on_startup(config: dict):
+ if (getConfig.__config_on_startup is None):
+ getConfig.__config_on_startup = copy.deepcopy(config)
+ config["config_on_startup"] = getConfig.__config_on_startup
+
if os.path.isfile(config_yaml_path):
try:
yaml = YAML()
@@ -126,9 +130,13 @@ def getConfig(default_val=APP_CONFIG_DEFAULTS):
config["net"]["listen_to_network"] = os.getenv("SD_UI_BIND_IP") == "0.0.0.0"
else:
config["net"]["listen_to_network"] = True
+
+ set_config_on_startup(config)
+
return config
except Exception as e:
log.warn(traceback.format_exc())
+ set_config_on_startup(default_val)
return default_val
else:
try:
@@ -149,8 +157,11 @@ def getConfig(default_val=APP_CONFIG_DEFAULTS):
return getConfig(default_val)
except Exception as e:
log.warn(traceback.format_exc())
+ set_config_on_startup(default_val)
return default_val
+getConfig.__config_on_startup = None
+
def setConfig(config):
try: # config.yaml
diff --git a/ui/index.html b/ui/index.html
index 3688a08c..490af689 100644
--- a/ui/index.html
+++ b/ui/index.html
@@ -142,7 +142,7 @@
|
-
+ |
Click to learn more about Clip Skip
|
@@ -232,7 +232,7 @@
|
-
+ |
|
@@ -244,18 +244,24 @@
|
|
- |
-
- |
- |
-
- Click to learn more about Seamless Tiling
- |
+
+ |
+
+
+ |
+
+
+ |
+
+
+ Click to learn more about Seamless Tiling
+ |
+
|
|