Include temp output files in asset registration
This commit is contained in:
parent
4266105b9e
commit
6d44ee0448
13
main.py
13
main.py
|
|
@ -244,18 +244,21 @@ def cuda_malloc_warning():
|
|||
def _collect_output_absolute_paths(history_result: dict) -> list[str]:
|
||||
"""Extract absolute file paths for output items from a history result."""
|
||||
paths: list[str] = []
|
||||
base_dir = folder_paths.get_directory_by_type("output")
|
||||
if base_dir is None:
|
||||
return paths
|
||||
base_dir = os.path.abspath(base_dir)
|
||||
seen: set[str] = set()
|
||||
for node_output in history_result.get("outputs", {}).values():
|
||||
for items in node_output.values():
|
||||
if not isinstance(items, list):
|
||||
continue
|
||||
for item in items:
|
||||
if not isinstance(item, dict) or item.get("type") != "output":
|
||||
if not isinstance(item, dict):
|
||||
continue
|
||||
item_type = item.get("type")
|
||||
if item_type not in ("output", "temp"):
|
||||
continue
|
||||
base_dir = folder_paths.get_directory_by_type(item_type)
|
||||
if base_dir is None:
|
||||
continue
|
||||
base_dir = os.path.abspath(base_dir)
|
||||
filename = item.get("filename")
|
||||
if not filename:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in New Issue