Skip to content

vllm_omni.diffusion.models.sana_wm.config

Config for the SANA-WM Stage-1 transformer.

Loaded from the standard diffusers transformer/config.json (a flat dict keyed by the dataclass field names). The bespoke config.yaml release format is handled once, offline, at checkpoint-conversion time — the runtime only ever sees the converted, diffusers-standard config.

SANA_WM_VAE_SPATIAL_COMPRESSION module-attribute

SANA_WM_VAE_SPATIAL_COMPRESSION = 32

SANA_WM_VAE_TEMPORAL_COMPRESSION module-attribute

SANA_WM_VAE_TEMPORAL_COMPRESSION = 8

SanaWmConfig dataclass

SANA-WM Stage-1 architecture and runtime config.

Defaults mirror the first public HF release. from_json (reading transformer/config.json) is the normal construction path.

architecture_name class-attribute instance-attribute

architecture_name: str | None = (
    "SanaMSVideoCamCtrl_1600M_P1_D20"
)

attn_type class-attribute instance-attribute

attn_type: str = 'BidirectionalGDNTriton'

cam_attn_compress class-attribute instance-attribute

cam_attn_compress: int = 1

chi_prompt class-attribute instance-attribute

chi_prompt: list[str] = field(default_factory=list)

chunk_plucker_channels class-attribute instance-attribute

chunk_plucker_channels: int = 48

chunk_plucker_post_attn_blocks class-attribute instance-attribute

chunk_plucker_post_attn_blocks: int = 20

conv_kernel_size class-attribute instance-attribute

conv_kernel_size: int = 4

cross_norm class-attribute instance-attribute

cross_norm: bool = True

ffn_type class-attribute instance-attribute

ffn_type: str = 'GLUMBConvTemp'

fp32_attention class-attribute instance-attribute

fp32_attention: bool = True

hidden_size class-attribute instance-attribute

hidden_size: int = 2240

image_size class-attribute instance-attribute

image_size: int = 720

inference_flow_shift class-attribute instance-attribute

inference_flow_shift: float = 9.8

k_conv_only class-attribute instance-attribute

k_conv_only: bool = True

linear_head_dim class-attribute instance-attribute

linear_head_dim: int = 112

mixed_precision class-attribute instance-attribute

mixed_precision: str = 'bf16'

mlp_ratio class-attribute instance-attribute

mlp_ratio: float = 3.0

model_max_length class-attribute instance-attribute

model_max_length: int = 300

num_blocks class-attribute instance-attribute

num_blocks: int = 20

patch_size class-attribute instance-attribute

patch_size: tuple[int, int, int] = (1, 1, 1)

pos_embed_type class-attribute instance-attribute

pos_embed_type: str = 'wan_rope'

qk_norm class-attribute instance-attribute

qk_norm: bool = True

scheduler_type class-attribute instance-attribute

scheduler_type: str = 'flow_dpm-solver'

softmax_every_n class-attribute instance-attribute

softmax_every_n: int = 4

t_kernel_size class-attribute instance-attribute

t_kernel_size: int = 3

use_chunk_plucker_post_attn class-attribute instance-attribute

use_chunk_plucker_post_attn: bool = True

from_dict classmethod

from_dict(data: Mapping[str, Any]) -> SanaWmConfig

Build from a flat mapping of field name -> value.

Unknown keys (e.g. the diffusers _class_name marker or the latent_channels / prompt_channels constructor kwargs) are ignored. patch_size is coerced from a JSON list back to a tuple.

from_json classmethod

from_json(path: str | Path) -> SanaWmConfig