mstar.model.wan22.config#

Configuration for Wan2.2-TI2V-5B (dense video DiT + UMT5-XXL + Wan2.2-VAE).

The architecture values are facts of the Wan-AI/Wan2.2-TI2V-5B-Diffusers checkpoint, hardcoded so that constructing the model never touches the network. Wan22Model._refresh_checkpoint_defaults re-reads flow_shift from the checkpoint at load time and hard-fails if the solver order or train-timestep count drift from what the inline UniPC port implements.

Classes

Wan22Config([variant, num_attention_heads, ...])

Wan2.2-TI2V-5B model configuration.

class mstar.model.wan22.config.Wan22Config(variant='ti2v_5b', num_attention_heads=24, attention_head_dim=128, num_layers=30, ffn_dim=14336, in_channels=48, out_channels=48, patch_size=(1, 2, 2), text_dim=4096, freq_dim=256, rope_max_seq_len=1024, qk_norm='rms_norm_across_heads', cross_attn_norm=True, eps=1e-06, text_max_seq_len=512, vae_z_dim=48, vae_scale_factor_spatial=16, vae_scale_factor_temporal=4, flow_shift=5.0, guidance_scale=5.0, default_num_inference_steps=50, default_height=704, default_width=1280, default_num_frames=81, default_negative_prompt='', video_fps=24, max_denoise_steps=100, compile_dit=True, vae_decode_tiling='auto')[source]#

Bases: object

Wan2.2-TI2V-5B model configuration.

A single dense video DiT driven by UMT5-XXL embeddings, denoising Wan2.2-VAE latents with UniPC. T2V and I2V share the one transformer: I2V injects the encoded first frame into the latent grid and zeroes its per-token timestep, rather than concatenating on the channel axis.

Parameters:
  • variant (str)

  • num_attention_heads (int)

  • attention_head_dim (int)

  • num_layers (int)

  • ffn_dim (int)

  • in_channels (int)

  • out_channels (int)

  • patch_size (tuple[int, int, int])

  • text_dim (int)

  • freq_dim (int)

  • rope_max_seq_len (int)

  • qk_norm (str)

  • cross_attn_norm (bool)

  • eps (float)

  • text_max_seq_len (int)

  • vae_z_dim (int)

  • vae_scale_factor_spatial (int)

  • vae_scale_factor_temporal (int)

  • flow_shift (float)

  • guidance_scale (float)

  • default_num_inference_steps (int)

  • default_height (int)

  • default_width (int)

  • default_num_frames (int)

  • default_negative_prompt (str)

  • video_fps (int)

  • max_denoise_steps (int)

  • compile_dit (bool)

  • vae_decode_tiling (str)

attention_head_dim: int = 128#
compile_dit: bool = True#
cross_attn_norm: bool = True#
default_height: int = 704#
default_negative_prompt: str = ''#
default_num_frames: int = 81#
default_num_inference_steps: int = 50#
default_width: int = 1280#
eps: float = 1e-06#
ffn_dim: int = 14336#
flow_shift: float = 5.0#
freq_dim: int = 256#
guidance_scale: float = 5.0#
property hidden_size: int#

DiT hidden width (num_attention_heads * attention_head_dim).

in_channels: int = 48#
max_denoise_steps: int = 100#
num_attention_heads: int = 24#
num_layers: int = 30#
out_channels: int = 48#
patch_size: tuple[int, int, int] = (1, 2, 2)#
qk_norm: str = 'rms_norm_across_heads'#
rope_max_seq_len: int = 1024#
property spatial_alignment: tuple[int, int]#

(height, width) pixel multiples a request’s size must satisfy — 32 each.

The VAE downsamples a pixel dimension by 16 and the DiT then patchifies by 2, so only exact multiples of the product survive both. An unaligned size has no clean failure inside the model, so it is rejected at the request seam (Wan22Model.process_prompt).

text_dim: int = 4096#
text_max_seq_len: int = 512#
vae_decode_tiling: str = 'auto'#
vae_scale_factor_spatial: int = 16#
vae_scale_factor_temporal: int = 4#
vae_z_dim: int = 48#
variant: str = 'ti2v_5b'#
video_fps: int = 24#