[Diffusion] Add LTX-2.5 Diffusion VAE decoder support (#6189)
Signed-off-by: mglyn <1203789601@qq.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
262ff14693
commit
5e4daaf197
22 files changed
+1832
-61
No files matched your search
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM-Omni project
|
||||
|
||||
"""Request normalization and validation shared by LTX pipeline variants."""
|
||||
|
||||
@@ -86,6 +86,7 @@ def validate_pipeline_request(
|
||||
vae_spatial_compression_ratio: int,
|
||||
vae_temporal_compression_ratio: int,
|
||||
pipeline_name: str,
|
||||
min_video_latent_spatial_size: tuple[int, int] | None = None,
|
||||
request_sigmas: list[float] | None = None,
|
||||
request_phase_sigmas: tuple[list[float] | None, ...] | None = None,
|
||||
) -> None:
|
||||
@@ -97,6 +98,18 @@ def validate_pipeline_request(
|
||||
f"{request_inputs.width}x{request_inputs.height}."
|
||||
)
|
||||
|
||||
if min_video_latent_spatial_size is not None:
|
||||
min_latent_height, min_latent_width = min_video_latent_spatial_size
|
||||
latent_height = request_inputs.height // vae_spatial_compression_ratio
|
||||
latent_width = request_inputs.width // vae_spatial_compression_ratio
|
||||
if latent_height < min_latent_height or latent_width < min_latent_width:
|
||||
raise ValueError(
|
||||
f"{pipeline_name} DiffVAE requires video latent spatial dimensions of at least "
|
||||
f"{min_latent_width}x{min_latent_height} for neighborhood attention, got "
|
||||
f"{latent_width}x{latent_height} from request resolution "
|
||||
f"{request_inputs.width}x{request_inputs.height}."
|
||||
)
|
||||
|
||||
if request_inputs.num_frames < 1 or (request_inputs.num_frames - 1) % vae_temporal_compression_ratio != 0:
|
||||
raise ValueError(
|
||||
f"{pipeline_name} `num_frames` must be {vae_temporal_compression_ratio} * k + 1, "
|
||||
|
||||
Reference in new issue
Block a user