From e5a3eca0ce683d62b8d6ec4c5844dac62440fb26 Mon Sep 17 00:00:00 2001 From: GACLove Date: Tue, 15 Jul 2025 16:56:28 +0800 Subject: [PATCH] feat: add logging for runner retrieval and modify pipeline execution to disable video saving in LightX2VInference --- lightx2v_nodes/universal_bridge.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/lightx2v_nodes/universal_bridge.py b/lightx2v_nodes/universal_bridge.py index 43db747..158079c 100644 --- a/lightx2v_nodes/universal_bridge.py +++ b/lightx2v_nodes/universal_bridge.py @@ -12,6 +12,7 @@ from easydict import EasyDict import asyncio import gc from comfy.utils import ProgressBar +import logging # from .config import get_available_attn_ops, get_available_quant_ops @@ -180,6 +181,8 @@ class LightX2VBridge: # Only model_cls and model_path are essential for runner identity key = f"{config.model_cls}_{config.model_path}" # type:ignore + logging.info(f"[lightx2v] get_runner: {key}") + # If we have a different runner, clear the old one first if self._current_runner_key != key: self.clear_cache() @@ -856,7 +859,7 @@ class LightX2VInference: progress.update_absolute(current_step) runner.set_progress_callback(update_progress) - images = asyncio.run(runner.run_pipeline()) + images = asyncio.run(runner.run_pipeline(save_video=False)) torch.cuda.empty_cache() gc.collect() @@ -869,13 +872,13 @@ class LightX2VInference: except Exception as e: print(f"Error in LightX2V generation: {e}") raise - finally: - for temp_file in temp_files: - if os.path.exists(temp_file): - try: - os.unlink(temp_file) - except Exception: - pass + # finally: #TODO: refactor lightx2v input + # for temp_file in temp_files: + # if os.path.exists(temp_file): + # try: + # os.unlink(temp_file) + # except Exception: + # pass def _decode_latents_to_images(self, decoded_images): """Decode latents to images using VAE."""