mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
fix: correctly set preset config and loras in meta parser
This commit is contained in:
@@ -106,8 +106,6 @@ def get_presets():
|
||||
|
||||
return presets + [f[:f.index(".json")] for f in os.listdir(preset_folder) if f.endswith('.json')]
|
||||
|
||||
available_presets = get_presets()
|
||||
|
||||
def update_presets():
|
||||
global available_presets
|
||||
available_presets = get_presets()
|
||||
@@ -128,13 +126,6 @@ def try_get_preset_content(preset):
|
||||
print(e)
|
||||
return {}
|
||||
|
||||
try:
|
||||
with open(os.path.abspath(f'./presets/default.json'), "r", encoding="utf-8") as json_file:
|
||||
config_dict.update(json.load(json_file))
|
||||
except Exception as e:
|
||||
print(f'Load default preset failed.')
|
||||
print(e)
|
||||
|
||||
available_presets = get_presets()
|
||||
preset = args_manager.args.preset
|
||||
config_dict.update(try_get_preset_content(preset))
|
||||
|
||||
Reference in New Issue
Block a user