Skip to content

vllm_omni.diffusion.utils.size_utils

Shared size normalization helpers for diffusion pipelines.

normalize_min_aligned_size

normalize_min_aligned_size(
    height: int, width: int, alignment: int
) -> tuple[int, int]

Clamp dimensions to the minimum valid aligned size.

This preserves floor-to-alignment behavior for normal requests while preventing very small dimensions from collapsing to zero after alignment.