From ca661150ad5f5e213d0fbcb7e4093a86185e6655 Mon Sep 17 00:00:00 2001 From: Luke Mino-Altherr Date: Tue, 17 Mar 2026 09:05:15 -0400 Subject: [PATCH] Guard against None base_dir in _collect_output_absolute_paths Return early with an empty list when folder_paths.get_directory_by_type('output') returns None to avoid os.path.join(None, ...) producing invalid paths. Amp-Thread-ID: https://ampcode.com/threads/T-019cfbe5-dffc-760a-9a37-9b041dd71e73 Co-authored-by: Amp --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 78e255652..209376986 100644 --- a/main.py +++ b/main.py @@ -245,6 +245,8 @@ def _collect_output_absolute_paths(history_result: dict) -> list[str]: """Extract absolute file paths for output items from a history result.""" paths = [] base_dir = folder_paths.get_directory_by_type("output") + if base_dir is None: + return paths for node_output in history_result.get("outputs", {}).values(): for items in node_output.values(): if not isinstance(items, list):