vllm_omni.diffusion.models.ltx2.ltx2_guidance ¶
Official multi-modal guidance for the LTX model family.
combine_velocity_via_x0 module-attribute ¶
combine_velocity_via_x0 = (
LTXGuidanceExecutor.combine_cfg_velocity
)
LTXDenoisePass dataclass ¶
LTXGuidanceExecutor ¶
Build and execute official LTX multi-guidance Transformer passes.
combine_cfg_velocity staticmethod ¶
combine_cfg_velocity(
sample: Tensor,
positive_velocity: Tensor,
negative_velocity: Tensor,
sigma: Tensor,
guidance_scale: float,
*,
model_sigma: Tensor | None = None,
) -> Tensor
predict_noise ¶
predict_noise(
pipeline: Any,
plan: LTXGuidancePlan,
index: int,
timestep: Tensor,
state: LTXAVState,
forward_ctx: LTXForwardContext,
denoise_ctx: LTXDenoiseContext,
preserve_positive_velocity: bool = False,
) -> tuple[Tensor, Tensor]
predict_parallel_guidance ¶
predict_parallel_guidance(
pipeline: Any,
plan: LTXGuidancePlan,
index: int,
timestep: Tensor,
state: LTXAVState,
forward_ctx: LTXForwardContext,
denoise_ctx: LTXDenoiseContext,
preserve_positive_velocity: bool = False,
) -> tuple[Tensor, Tensor]
prepare_denoise_context staticmethod ¶
prepare_denoise_context(
plan: LTXGuidancePlan,
guidance_parallel_ready: bool,
guidance_world_size: int,
denoise_ctx: LTXDenoiseContext,
) -> LTXDenoiseContext
timestep_kwargs staticmethod ¶
timestep_kwargs(
ts: Tensor,
video_token_count: int,
audio_token_count: int,
*,
expand_for_sequence_parallel: bool = False,
) -> dict[str, Tensor]
validate_guidance_world_size staticmethod ¶
validate_guidance_world_size(
plan: LTXGuidancePlan, guidance_world_size: int
) -> None
warn_if_imbalanced classmethod ¶
warn_if_imbalanced(
plan: LTXGuidancePlan,
guidance_world_size: int,
phase_name: str,
) -> None
LTXGuidancePlan dataclass ¶
Concrete Transformer passes derived from a guidance specification.
LTXGuidanceSpec dataclass ¶
Video and audio guidance requested for one denoise phase.
LTXModalityGuidance dataclass ¶
Guidance parameters applied to one LTX output modality.
build_perturbation_kwargs ¶
build_perturbation_kwargs(
plan: LTXGuidancePlan,
batch_size: int,
reference: Tensor,
) -> dict[str, Any]
combine_guided_x0 ¶
combine_guided_x0(
*,
cond: Tensor,
uncond_text: Tensor | float,
uncond_perturbed: Tensor | float,
uncond_modality: Tensor | float,
guidance: LTXModalityGuidance,
rescale_token_count: int | None = None,
) -> Tensor
euler_step_from_velocity ¶
euler_step_from_velocity(
sample: Tensor,
velocity: Tensor,
sigmas: Tensor,
step_index: int,
) -> Tensor
velocity_from_x0 ¶
Convert x0 back to velocity using the official fp32 arithmetic order.
x0_from_velocity ¶
Convert velocity to x0 using the official fp32 arithmetic order.