diff --git a/scripts/rocm/rocm_mgr.py b/scripts/rocm/rocm_mgr.py index 9bbc0199f..27b3b36fc 100644 --- a/scripts/rocm/rocm_mgr.py +++ b/scripts/rocm/rocm_mgr.py @@ -123,8 +123,12 @@ def _get_venv() -> str: def _get_root() -> str: - """App root — one level above the venv folder (e.g. E:\\Sd.Next).""" - return str(Path(_get_venv()).parent) + """App root — from modules.paths.script_path.""" + try: + from modules.paths import script_path # pylint: disable=import-outside-toplevel + return str(script_path) + except Exception: + return str(Path(_get_venv()).parent) def _expand_venv(value: str) -> str: