mirror of
https://github.com/lllyasviel/Fooocus.git
synced 2026-08-16 13:13:16 +02:00
Merge branch 'mashb1t:main' into load-upscale-strength-from-config
This commit is contained in:
+13
-1
@@ -137,6 +137,18 @@ def try_load_preset_global(preset):
|
||||
preset = args_manager.args.preset
|
||||
try_load_preset_global(preset)
|
||||
|
||||
def get_path_output(make_directory=False) -> str:
|
||||
"""
|
||||
Checking output path argument and overriding default path.
|
||||
"""
|
||||
global config_dict
|
||||
path_output = get_dir_or_set_default('path_outputs', '../outputs/', make_directory)
|
||||
if args_manager.args.output_path:
|
||||
print(f'[CONFIG] Overriding config value path_outputs with {args_manager.args.output_path}')
|
||||
config_dict['path_outputs'] = path_output = args_manager.args.output_path
|
||||
return path_output
|
||||
|
||||
|
||||
def get_dir_or_set_default(key, default_value, make_directory=False):
|
||||
global config_dict, visited_keys, always_save_keys
|
||||
|
||||
@@ -173,8 +185,8 @@ path_inpaint = get_dir_or_set_default('path_inpaint', '../models/inpaint/')
|
||||
path_controlnet = get_dir_or_set_default('path_controlnet', '../models/controlnet/')
|
||||
path_clip_vision = get_dir_or_set_default('path_clip_vision', '../models/clip_vision/')
|
||||
path_fooocus_expansion = get_dir_or_set_default('path_fooocus_expansion', '../models/prompt_expansion/fooocus_expansion')
|
||||
path_outputs = get_dir_or_set_default('path_outputs', '../outputs/', True)
|
||||
path_safety_checker_models = get_dir_or_set_default('path_safety_checker_models', '../models/safety_checker_models/')
|
||||
path_outputs = get_path_output(True)
|
||||
|
||||
|
||||
def get_config_item_or_set_default(key, default_value, validator, disable_empty_as_none=False):
|
||||
|
||||
Reference in New Issue
Block a user