vllm_omni.diffusion.models.ltx2.ltx2_conditioning ¶
Task-specific conditioning shared by LTX model versions.
LTXI2VConditioningMixin ¶
First-frame conditioning with optional unified T2V/I2V dispatch.
video_processor instance-attribute ¶
video_processor = VideoProcessor(
vae_scale_factor=self.vae_spatial_compression_ratio,
resample="bilinear",
)
prepare_latents ¶
prepare_latents(
image: Tensor | None = None,
batch_size: int = 1,
num_channels_latents: int = 128,
height: int = 512,
width: int = 768,
num_frames: int = 121,
noise_scale: float = 0.0,
dtype: dtype | None = None,
device: device | None = None,
generator: Generator | list[Generator] | None = None,
latents: Tensor | None = None,
) -> Tensor | tuple[Tensor, Tensor]
LTXPromptContext dataclass ¶
LTXTextConditioningMixin ¶
Shared Gemma encoding and text connector orchestration.
encode_prompt ¶
encode_prompt(
prompt: str | list[str] | None,
negative_prompt: str | list[str] | None = None,
do_classifier_free_guidance: bool = True,
num_videos_per_prompt: int = 1,
prompt_embeds: Tensor | None = None,
negative_prompt_embeds: Tensor | None = None,
prompt_attention_mask: Tensor | None = None,
negative_prompt_attention_mask: Tensor | None = None,
max_sequence_length: int = 1024,
scale_factor: int = 8,
device: device | None = None,
dtype: dtype | None = None,
) -> tuple[Tensor, Tensor, Tensor | None, Tensor | None]