Skip to content

Commit

Permalink
fix: capture all other keys than 'models_to_load' in webui
Browse files Browse the repository at this point in the history
  • Loading branch information
tazlin committed Jun 2, 2023
1 parent da965de commit b7f4600
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,13 @@ def save_config(self, args):
models_to_load.extend(value)
elif cfgkey == "ram_to_leave_free" or cfgkey == "vram_to_leave_free":
config[cfgkey] = str(value) + "%"
elif cfgkey == "dreamer_name" and value == "An Awesome Dreamer":
elif cfgkey == "dreamer_name" and (value == "An Awesome Dreamer" or not value):
skipped_keys.append("dreamer_name")
elif cfgkey == "scribe_name" and value == "An Awesome Scribe":
elif cfgkey == "scribe_name" and (value == "An Awesome Scribe" or not value):
skipped_keys.append("scribe_name")
elif cfgkey == "alchemist_name" and value == "An Awesome Alchemist":
elif cfgkey == "alchemist_name" and (value == "An Awesome Alchemist" or not value):
skipped_keys.append("alchemist_name")
config[cfgkey] = value if cfgkey != "models_to_load" else None

config["models_to_load"] = models_to_load
with open(WebUI.CONFIG_FILE, "wt", encoding="utf-8") as configfile:
Expand Down

0 comments on commit b7f4600

Please sign in to comment.