mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-27 20:13:32 +08:00
Include temp output files in asset registration
Some checks failed
Build package / Build Test (3.11) (push) Has been cancelled
Build package / Build Test (3.12) (push) Has been cancelled
Build package / Build Test (3.13) (push) Has been cancelled
Build package / Build Test (3.14) (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Python Linting / Run Ruff (push) Has been cancelled
Build package / Build Test (3.10) (push) Has been cancelled
Some checks failed
Build package / Build Test (3.11) (push) Has been cancelled
Build package / Build Test (3.12) (push) Has been cancelled
Build package / Build Test (3.13) (push) Has been cancelled
Build package / Build Test (3.14) (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Python Linting / Run Ruff (push) Has been cancelled
Build package / Build Test (3.10) (push) Has been cancelled
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
Block a user