From 31c51c9907fe5eba04c252371772b612711a0765 Mon Sep 17 00:00:00 2001 From: gaclove Date: Thu, 24 Jul 2025 20:30:28 +0800 Subject: [PATCH] fix: ensure temporary files are deleted after inference in LightX2VModularInference --- lightx2v | 2 +- nodes.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lightx2v b/lightx2v index 305350a..f662570 160000 --- a/lightx2v +++ b/lightx2v @@ -1 +1 @@ -Subproject commit 305350a16b9facdb79e6cc1ed1a5594312d5f92b +Subproject commit f662570da3aebb871479cd7dedb870597ab23a10 diff --git a/nodes.py b/nodes.py index 9460174..8bd061b 100644 --- a/nodes.py +++ b/nodes.py @@ -757,13 +757,13 @@ class LightX2VModularInference: logging.error(f"Error during inference: {e}") raise - # finally: - # for temp_file in temp_files: - # if os.path.exists(temp_file): - # try: - # os.unlink(temp_file) - # except Exception: - # pass + finally: + for temp_file in temp_files: + if os.path.exists(temp_file): + try: + os.unlink(temp_file) + except Exception: + pass NODE_CLASS_MAPPINGS = {