From 04900ebf04a571da15028afe5c8ea50be72ba1d3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 19 Jan 2026 04:37:49 +0000 Subject: [PATCH] Address code review feedback: fix formatting and clarify messages Co-authored-by: hsliuustc0106 <222337142+hsliuustc0106@users.noreply.github.com> --- examples/offline_inference/ltx2/text_to_video.py | 3 ++- vllm_omni/diffusion/models/ltx2/pipeline_ltx2.py | 12 +++++------- vllm_omni/diffusion/registry.py | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/offline_inference/ltx2/text_to_video.py b/examples/offline_inference/ltx2/text_to_video.py index 47bfb476b..5073b9474 100644 --- a/examples/offline_inference/ltx2/text_to_video.py +++ b/examples/offline_inference/ltx2/text_to_video.py @@ -66,7 +66,8 @@ def main(): if hasattr(first_item, "final_output_type"): if first_item.final_output_type != "image": raise ValueError( - f"Unexpected output type '{first_item.final_output_type}', expected 'image' for video generation." + f"Unexpected output type '{first_item.final_output_type}', " + f"expected 'image' for video frames output." ) # Pipeline mode: extract from nested request_output diff --git a/vllm_omni/diffusion/models/ltx2/pipeline_ltx2.py b/vllm_omni/diffusion/models/ltx2/pipeline_ltx2.py index 4cc2de28b..c74de2684 100644 --- a/vllm_omni/diffusion/models/ltx2/pipeline_ltx2.py +++ b/vllm_omni/diffusion/models/ltx2/pipeline_ltx2.py @@ -55,9 +55,8 @@ def get_ltx2_pre_process_func( class LTX2Pipeline(nn.Module): - """ - Wrapper for Lightricks LTX-2 text-to-video pipeline. - + """Wrapper for Lightricks LTX-2 text-to-video pipeline. + This model uses the diffusers LTXVideoPipeline for efficient video generation. Supports text-to-video and image-to-video generation. """ @@ -105,9 +104,8 @@ class LTX2Pipeline(nn.Module): generator: Optional[torch.Generator] = None, **kwargs, ) -> DiffusionOutput: - """ - Generate video from text prompt. - + """Generate video from text prompt. + Args: req: OmniDiffusionRequest containing generation parameters prompt: Text prompt for video generation @@ -120,7 +118,7 @@ class LTX2Pipeline(nn.Module): output_type: Output format ("np", "pt", or "pil") generator: Random generator for reproducibility **kwargs: Additional arguments passed to the pipeline - + Returns: DiffusionOutput containing the generated video frames """ diff --git a/vllm_omni/diffusion/registry.py b/vllm_omni/diffusion/registry.py index b8fa5cde3..54b3820bd 100644 --- a/vllm_omni/diffusion/registry.py +++ b/vllm_omni/diffusion/registry.py @@ -105,7 +105,7 @@ def initialize_model( if model_class is not None: model = model_class(od_config=od_config) # Configure VAE memory optimization settings from config - # For pipelines that wrap diffusers pipelines (like LTX2Pipeline), + # For pipelines that wrap diffusers pipelines (like LTX2Pipeline), # VAE is accessed via model.pipe.vae vae = None if hasattr(model, "vae"):