From 8948d67844a3ef18d9e2df9009d69fd00dab6639 Mon Sep 17 00:00:00 2001 From: zhu yu Date: Sun, 1 Dec 2024 16:56:54 +0800 Subject: [PATCH] [fix]path bug --- custom_functions/AI_portrait_wf_py.py | 3 ++- custom_functions/bgmatting_api.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/custom_functions/AI_portrait_wf_py.py b/custom_functions/AI_portrait_wf_py.py index ae6945071..e2b2dad54 100644 --- a/custom_functions/AI_portrait_wf_py.py +++ b/custom_functions/AI_portrait_wf_py.py @@ -37,7 +37,8 @@ def find_path(name: str, path: str = None) -> str: """ # If no path is given, use the current working directory if path is None: - path = os.getcwd() + # path = os.getcwd() + path = os.path.dirname(__file__) # Check if the current directory contains the name if name in os.listdir(path): diff --git a/custom_functions/bgmatting_api.py b/custom_functions/bgmatting_api.py index 0eb48e189..a5545c122 100644 --- a/custom_functions/bgmatting_api.py +++ b/custom_functions/bgmatting_api.py @@ -37,7 +37,8 @@ def find_path(name: str, path: str = None) -> str: """ # If no path is given, use the current working directory if path is None: - path = os.getcwd() + # path = os.getcwd() + path = os.path.dirname(__file__) # Check if the current directory contains the name if name in os.listdir(path):