Address code review feedback: fix formatting and clarify messages
Co-authored-by: hsliuustc0106 <222337142+hsliuustc0106@users.noreply.github.com>
This commit is contained in:
1 parent
d3a13425d9
commit
04900ebf04
3 files changed
+8
-9
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
"""
|
||||
|
||||
@@ -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"):
|
||||
|
||||
Reference in new issue
Block a user