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):