From 26fe88d8a6ffcc84671d4d549472d68147129dac Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Thu, 12 Oct 2023 15:41:23 -0700 Subject: [PATCH] fix (#662) * i * i --- backend/headless/folder_paths.py | 8 ++++---- build_chb.py | 2 ++ fooocus_version.py | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/headless/folder_paths.py b/backend/headless/folder_paths.py index 5d121b44..80f8dd72 100644 --- a/backend/headless/folder_paths.py +++ b/backend/headless/folder_paths.py @@ -5,7 +5,7 @@ supported_pt_extensions = set(['.ckpt', '.pt', '.bin', '.pth', '.safetensors']) folder_names_and_paths = {} -base_path = os.path.dirname(os.path.realpath(__file__)) +base_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) models_dir = os.path.join(base_path, "models") folder_names_and_paths["checkpoints"] = ([os.path.join(models_dir, "checkpoints")], supported_pt_extensions) folder_names_and_paths["configs"] = ([os.path.join(models_dir, "configs")], [".yaml"]) @@ -31,9 +31,9 @@ folder_names_and_paths["hypernetworks"] = ([os.path.join(models_dir, "hypernetwo folder_names_and_paths["classifiers"] = ([os.path.join(models_dir, "classifiers")], {""}) -output_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "output") -temp_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "temp") -input_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), "input") +output_directory = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))), "output") +temp_directory = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))), "temp") +input_directory = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))), "input") filename_list_cache = {} diff --git a/build_chb.py b/build_chb.py index d6592fe6..31a4bdc6 100644 --- a/build_chb.py +++ b/build_chb.py @@ -60,5 +60,7 @@ shutil.rmtree(temp_path, onerror=onerror) findReplace("./backend", "comfy", "fcbh", "*.py") findReplace("./backend", "Comfy", "FCBH", "*.py") findReplace("./backend", "FCBHUI", "fcbh_backend", "*.py") +findReplace("./backend", "os.path.dirname(os.path.realpath(__file__))", + "os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))", "folder_paths.py") print('Backend is built.') diff --git a/fooocus_version.py b/fooocus_version.py index fcb81bf0..a7408150 100644 --- a/fooocus_version.py +++ b/fooocus_version.py @@ -1 +1 @@ -version = '2.1.52' +version = '2.1.53'