From 15e2fbef43c725f0c8320f663a2a1bf5a6db93c6 Mon Sep 17 00:00:00 2001 From: JaQuan Date: Sun, 15 Jun 2025 22:08:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E5=A5=BD=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E5=8E=BB=E8=8E=B7=E5=8F=96output=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aiia_browser_node.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/aiia_browser_node.py b/aiia_browser_node.py index d6f9a07..ac5d1d8 100644 --- a/aiia_browser_node.py +++ b/aiia_browser_node.py @@ -13,22 +13,14 @@ import traceback from io import BytesIO import re import tempfile +import folder_paths print("--- [AIIA] Loading Media Browser API Endpoints (V19 - Robustness Fixes) ---") # --- START OF FIX: Path and Cache Logic Refinement --- try: # Attempt to find the ComfyUI root directory robustly - comfyui_root_path = Path(__file__).resolve().parents[2] - if not (comfyui_root_path / "main.py").exists(): - current_dir = Path(__file__).resolve().parent - while not (current_dir / "main.py").exists() and current_dir != current_dir.parent: - current_dir = current_dir.parent - if (current_dir / "main.py").exists(): - comfyui_root_path = current_dir - else: - raise FileNotFoundError("Could not find ComfyUI root directory.") - output_dir = comfyui_root_path / "output" + output_dir = Path(folder_paths.get_output_directory()) print(f"--- [AIIA] Successfully located ComfyUI root. Output directory set to: {output_dir}") except Exception as e: