vllm_omni.diffusion.models.sana_wm.pipeline_sana_wm ¶
Sana-WM pipeline integration.
This module wires the registry-visible surface, release-layout validation, and the Stage-1 sampling loop. The DiT, Gated-DeltaNet and camera stack are vLLM-Omni-native layers (sana_wm_transformer.py / ucpe.py); nothing here calls into NVlabs code at runtime.
SANA_WM_MODEL_ID module-attribute ¶
SANA_WM_NATIVE_MAX_TOKENS module-attribute ¶
SANA_WM_NATIVE_MAX_TOKENS = (
(
(SANA_WM_NATIVE_NUM_FRAMES - 1)
// SANA_WM_VAE_TEMPORAL_COMPRESSION
+ 1
)
* (
SANA_WM_OUTPUT_HEIGHT
// SANA_WM_VAE_SPATIAL_COMPRESSION
)
* (
SANA_WM_OUTPUT_WIDTH
// SANA_WM_VAE_SPATIAL_COMPRESSION
)
)
SANA_WM_STAGE1_DIT_BASENAME module-attribute ¶
SANA_WM_STAGE1_DIT_BASENAME = Path(
SANA_WM_STAGE1_DIT_FILE
).name
SANA_WM_STAGE1_DIT_FILE module-attribute ¶
SANA_WM_STAGE1_PATTERNS module-attribute ¶
SANA_WM_STAGE1_PATTERNS = (
SANA_WM_CONFIG_FILE,
SANA_WM_STAGE1_DIT_FILE,
SANA_WM_VAE_CONFIG_FILE,
SANA_WM_VAE_WEIGHT_FILE,
)
SANA_WM_STAGE1_TEXT_ENCODER_ENV module-attribute ¶
SANA_WM_STAGE1_TEXT_ENCODER_FALLBACK_ID module-attribute ¶
SANA_WM_STAGE1_TEXT_ENCODER_ID module-attribute ¶
SANA_WM_VAE_WEIGHT_FILE module-attribute ¶
SanaWmLocalPaths dataclass ¶
SanaWmNativeParams dataclass ¶
Resolved generation settings for one Stage-1 request.
Built by _native_params from the request payload and sampling params, and consumed by _run_native_backend — this is the production path.
SanaWmPipeline ¶
Bases: Module, CFGParallelMixin, SupportImageInput, SupportsComponentDiscovery, ProgressBarMixin, DiffusionPipelineProfilerMixin
Stage-1 SANA-WM image-to-video pipeline.
quant_config instance-attribute ¶
quant_config = (
getattr(od_config, "quantization_config", None)
if od_config is not None
else None
)
transformer instance-attribute ¶
transformer = SanaWmTransformer3DModel(
config=self.sana_wm_config,
quant_config=self.quant_config,
prefix=f"{prefix}.transformer"
if prefix
else "transformer",
)
build_sana_wm_download_patterns ¶
Return the minimal HF allow-patterns needed for SANA-WM.
build_sana_wm_output_envelope ¶
build_sana_wm_output_envelope(
*,
output: Any,
output_type: str,
metadata: dict[str, Any],
) -> dict[str, Any]
Wrap a Stage-1 result in the canonical output envelope.
normalize_diffusion_postprocess_output splits {"payload": ..., "metadata": ...} into the API-facing payload and the metadata groups, so the model-specific diagnostics ride along under a sana_wm group instead of the removed DiffusionOutput.custom_output field.
resolve_or_download_sana_wm_checkpoint ¶
resolve_or_download_sana_wm_checkpoint(
model: str = SANA_WM_MODEL_ID,
*,
revision: str | None = None,
cache_dir: str | None = None,
) -> SanaWmLocalPaths
Resolve a local SANA-WM tree or download the required HF files.
resolve_sana_wm_local_paths ¶
resolve_sana_wm_local_paths(
snapshot_dir: str | Path,
) -> SanaWmLocalPaths