vllm_omni.diffusion.models.wan2_2.chunked_mp4 ¶
Worker-side MP4 encoding for Wan VAE temporal chunks.
WAN_DEFAULT_VIDEO_CODEC_OPTIONS module-attribute ¶
resolve_wan_output_fps ¶
Resolve the fps the worker encodes with.
The serving layer resolves output fps from the request's fps field, not from frame_rate, so pre-encoding has to read the same field or the bytes would carry a rate the response does not advertise.
resolve_wan_preencode_batch_frames ¶
resolve_wan_preencode_batch_frames(
sampling_params: Any,
*,
default: int = WAN_DEFAULT_BATCH_FRAMES,
) -> int
Read the MP4 batching threshold before starting expensive generation.
resolve_wan_preencode_mp4 ¶
Return whether this request wants the worker to pre-encode the MP4.
Reject rather than silently downgrade the combinations the pre-encoded path cannot serve: it emits MP4 bytes, so nothing downstream can interpolate frames or hand back an array.
resolve_wan_video_codec_options ¶
Read the request's encoder options, preserving serving defaults.
An absent key inherits the one-shot serving encoder's defaults. Explicit None and an empty mapping remain distinct caller choices.
wan_preencoded_mp4_payload ¶
Return a post-process payload when the worker already encoded the MP4.
Returns None for the ordinary frame-tensor output so callers fall through to their existing post-processing.
No fps is reported here: :func:resolve_wan_output_fps mirrors the fallback the serving layer applies, so the rate the response advertises already matches the rate these bytes were encoded at.