fix: ensure temporary files are deleted after inference in LightX2VModularInference

This commit is contained in:
gaclove
2025-07-24 20:30:28 +08:00
parent 022ddfd619
commit 31c51c9907
2 changed files with 8 additions and 8 deletions
+7 -7
View File
@@ -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 = {