Skip to content
FastVideo
Esc
↑↓navigate↵open⌘Jpreview
On this page

pipeline_configs

PipelineConfig for the daVinci-MagiHuman base text-to-AV pipeline.

fastvideo.pipelines.basic.magi_human.pipeline_configs.DiTConfig

DiTConfig(arch_config: DiTArchConfig = DiTArchConfig(), prefix: str = '', quant_config: QuantizationConfig | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)

fastvideo.pipelines.basic.magi_human.pipeline_configs.DiTConfig.add_cli_args

add_cli_args(parser: Any, prefix: str = 'dit-config') -> Any

Add CLI arguments for DiTConfig fields

fastvideo.pipelines.basic.magi_human.pipeline_configs.EncoderConfig

EncoderConfig(arch_config: ArchConfig = EncoderArchConfig(), prefix: str = '', quant_config: QuantizationConfig | None = None, lora_config: Any | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)

fastvideo.pipelines.basic.magi_human.pipeline_configs.VAEConfig

VAEConfig(arch_config: VAEArchConfig = VAEArchConfig(), load_encoder: bool = True, load_decoder: bool = True, tile_sample_min_height: int = 256, tile_sample_min_width: int = 256, tile_sample_min_num_frames: int = 16, tile_sample_stride_height: int = 192, tile_sample_stride_width: int = 192, tile_sample_stride_num_frames: int = 12, blend_num_frames: int = 0, use_tiling: bool = True, use_temporal_tiling: bool = True, use_parallel_tiling: bool = True, use_temporal_scaling_frames: bool = True, *, _resolved_attention_backend: AttentionBackendEnum | None = None)

fastvideo.pipelines.basic.magi_human.pipeline_configs.VAEConfig.add_cli_args

add_cli_args(parser: Any, prefix: str = 'vae-config') -> Any

Add CLI arguments for VAEConfig fields

fastvideo.pipelines.basic.magi_human.pipeline_configs.VAEConfig.from_cli_args

from_cli_args(args: argparse.Namespace) -> VAEConfig

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanVideoConfig

MagiHumanVideoConfig(arch_config: DiTArchConfig = MagiHumanArchConfig(), prefix: str = 'magi_human', quant_config: QuantizationConfig | None = None, *, _resolved_attention_backend: AttentionBackendEnum | None = None)

fastvideo.pipelines.basic.magi_human.pipeline_configs.BaseEncoderOutput

BaseEncoderOutput(last_hidden_state: torch.FloatTensor | None = None, pooler_output: torch.FloatTensor | None = None, hidden_states: tuple[torch.FloatTensor, ...] | None = None, attentions: tuple[torch.FloatTensor, ...] | None = None, attention_mask: torch.Tensor | None = None)

fastvideo.pipelines.basic.magi_human.pipeline_configs.T5GemmaEncoderConfig

T5GemmaEncoderConfig(arch_config: TextEncoderArchConfig = T5GemmaEncoderArchConfig(), prefix: str = 't5gemma', quant_config: QuantizationConfig | None = None, lora_config: Any | None = None, is_chat_model: bool = False, treat_empty_as_dot: bool = False, *, _resolved_attention_backend: AttentionBackendEnum | None = None, chat_template_enable_thinking: bool = False)

fastvideo.pipelines.basic.magi_human.pipeline_configs.OobleckVAEConfig

OobleckVAEConfig(arch_config: VAEArchConfig = OobleckVAEArchConfig(), load_encoder: bool = True, load_decoder: bool = True, tile_sample_min_height: int = 256, tile_sample_min_width: int = 256, tile_sample_min_num_frames: int = 16, tile_sample_stride_height: int = 192, tile_sample_stride_width: int = 192, tile_sample_stride_num_frames: int = 12, blend_num_frames: int = 0, use_tiling: bool = False, use_temporal_tiling: bool = False, use_parallel_tiling: bool = False, use_temporal_scaling_frames: bool = True, pretrained_path: str = 'stabilityai/stable-audio-open-1.0', pretrained_subfolder: str = 'vae', pretrained_dtype: str = 'float16', *, _resolved_attention_backend: AttentionBackendEnum | None = None)

FastVideo VAE config wrapping the Oobleck arch.

Audio VAEs don't use the temporal/spatial tiling defaults that the base VAEConfig is shaped for (those exist for video VAEs); they are retained but irrelevant for audio.

fastvideo.pipelines.basic.magi_human.pipeline_configs.WanVAEConfig

WanVAEConfig(arch_config: WanVAEArchConfig = WanVAEArchConfig(), load_encoder: bool = True, load_decoder: bool = True, tile_sample_min_height: int = 256, tile_sample_min_width: int = 256, tile_sample_min_num_frames: int = 16, tile_sample_stride_height: int = 192, tile_sample_stride_width: int = 192, tile_sample_stride_num_frames: int = 12, blend_num_frames: int = 0, use_tiling: bool = False, use_temporal_tiling: bool = False, use_parallel_tiling: bool = False, use_temporal_scaling_frames: bool = True, use_feature_cache: bool = True, use_light_vae: bool = False, *, _resolved_attention_backend: AttentionBackendEnum | None = None)

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig

PipelineConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = None, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = DiTConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = VAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = True, vae_sp: bool = True, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (EncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('fp32',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.tensor], ...] = (lambda: (postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None)

Base configuration for all pipeline architectures.

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.add_cli_args

add_cli_args(parser: FlexibleArgumentParser, prefix: str = '') -> FlexibleArgumentParser

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.update_config_from_dict

update_config_from_dict(args: dict[str, Any], prefix: str = '') -> None

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.from_pretrained

from_pretrained(model_path: str) -> PipelineConfig

use the pipeline class setting from model_path to match the pipeline config

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.from_kwargs

from_kwargs(kwargs: dict[str, Any], config_cli_prefix: str = '') -> PipelineConfig

Load PipelineConfig from kwargs Dictionary. kwargs: dictionary of kwargs config_cli_prefix: prefix of CLI arguments for this PipelineConfig instance

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.check_pipeline_config

check_pipeline_config() -> None

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.resolve_checkpoint_settings

resolve_checkpoint_settings(fastvideo_args: FastVideoArgs) -> None

Apply the run settings that the checkpoint at fastvideo_args.model_path fixes.

FastVideoArgs.__post_init__ calls this once in the main process, before argument validation and before any weights load. Most checkpoints fix no run settings, so the base implementation does nothing.

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.apply_request_constraints

apply_request_constraints(request: GenerationRequest, sampling_param: SamplingParam) -> SamplingParam

Apply this model's constraints on a generation request to its sampling parameters.

sampling_param holds the preset defaults with the request's explicit fields applied. A model sets the values it fixes when the request leaves them unset, and raises when the request sets a value it does not accept. The base PipelineConfig accepts every request unchanged.

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.dump_to_json

dump_to_json(file_path: str)

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.load_from_json

load_from_json(file_path: str)

fastvideo.pipelines.basic.magi_human.pipeline_configs.PipelineConfig.update_pipeline_config

update_pipeline_config(source_pipeline_dict: dict[str, Any]) -> None

fastvideo.pipelines.basic.magi_human.pipeline_configs.t5gemma_postprocess_text

t5gemma_postprocess_text(outputs: BaseEncoderOutput) -> torch.Tensor

Return per-prompt last_hidden_state as a batched [B, L, D] tensor.

MagiHuman pads/trims the embedding to a fixed length in its own pad_or_trim helper at pipeline time. Here we simply hand through whatever the tokenizer produced — the latent-prep stage is responsible for pad/trim so that the original context length can be preserved.

Source
def t5gemma_postprocess_text(outputs: BaseEncoderOutput) -> torch.Tensor:
    """Return per-prompt last_hidden_state as a batched [B, L, D] tensor.
MagiHuman pads/trims the embedding to a fixed length in its own
`pad_or_trim` helper at pipeline time. Here we simply hand through
whatever the tokenizer produced — the latent-prep stage is responsible
for pad/trim so that the original context length can be preserved.
"""
hidden = outputs.last_hidden_state
assert torch.isnan(hidden).sum() == 0
# Keep the shape the tokenizer emitted; the pipeline stage handles
# pad-or-trim to t5_gemma_target_length=640.
return hidden</code></pre></details>

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanBaseConfig

MagiHumanBaseConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = MagiHumanVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (T5GemmaEncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.Tensor], ...] = (lambda: (t5gemma_postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None, audio_vae_config: VAEConfig = OobleckVAEConfig(), precision: str = 'bf16', t5_gemma_target_length: int = 640, fps: int = 25, num_inference_steps: int = 32, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 2, vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, frame_receptive_field: int = 11, coords_style: str = 'v2', ref_audio_offset: int = 1000, text_offset: int = 0, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0)

Base MagiHuman text-to-AV pipeline config (prompt → video + audio).

MagiHuman's base model is a joint audio-visual generator. This config wires up both the video VAE (Wan 2.2 TI2V-5B) and the audio VAE (Stable Audio Open 1.0); the pipeline produces an mp4 with a muxed audio track. The framework's WorkloadType enum has no T2AV variant yet, so the registry entry uses WorkloadType.T2V as a placeholder.

Source
@dataclass
class MagiHumanBaseConfig(PipelineConfig):
    """Base MagiHuman text-to-AV pipeline config (prompt → video + audio).
MagiHuman&#x27;s base model is a joint audio-visual generator. This config
wires up both the video VAE (Wan 2.2 TI2V-5B) and the audio VAE
(Stable Audio Open 1.0); the pipeline produces an mp4 with a muxed
audio track. The framework&#x27;s `WorkloadType` enum has no `T2AV`
variant yet, so the registry entry uses `WorkloadType.T2V` as a
placeholder.
&quot;&quot;&quot;

# DiT
dit_config: DiTConfig = field(default_factory=MagiHumanVideoConfig)
# VAE — Wan 2.2 TI2V-5B. Diffusers `vae/config.json` drives arch_config
# at load time, including z_dim=48 and scale_factor_temporal=4 /
# scale_factor_spatial=16.
vae_config: VAEConfig = field(default_factory=WanVAEConfig)
vae_tiling: bool = False
vae_sp: bool = False

# Audio VAE — Stable Audio Open 1.0 (Oobleck), shared with the
# standalone Stable Audio pipeline. Lazy-loaded from
# `stabilityai/stable-audio-open-1.0` (HF gated, Apache 2.0).
audio_vae_config: VAEConfig = field(default_factory=OobleckVAEConfig)

# Denoising (flow-matching UniPC).
flow_shift: float | None = 5.0

# Text encoding
text_encoder_configs: tuple&#91;EncoderConfig, ...&#93; = field(default_factory=lambda: (T5GemmaEncoderConfig(), ))
postprocess_text_funcs: tuple&#91;Callable&#91;&#91;BaseEncoderOutput&#93;, torch.Tensor&#93;,
                              ...&#93; = field(default_factory=lambda: (t5gemma_postprocess_text, ))

# Precisions — the DiT runs bf16 internally, the text encoder is
# bf16-native, and the VAE decode path benefits from fp32 for long
# sequences.
precision: str = &quot;bf16&quot;
vae_precision: str = &quot;fp32&quot;
text_encoder_precisions: tuple&#91;str, ...&#93; = field(default_factory=lambda: (&quot;bf16&quot;, ))

# MagiHuman-specific defaults surfaced for the pipeline stages. These
# are pipeline-level knobs sourced from the upstream
# `EvaluationConfig` / `DataProxyConfig` (not `ModelConfig`), so they
# belong here, NOT on `MagiHumanArchConfig`.
t5_gemma_target_length: int = 640
fps: int = 25
num_inference_steps: int = 32
video_txt_guidance_scale: float = 5.0
audio_txt_guidance_scale: float = 5.0
cfg_number: int = 2

# VAE / data-proxy knobs (were on ArchConfig before; moved here).
vae_stride: tuple&#91;int, int, int&#93; = (4, 16, 16)
z_dim: int = 48
frame_receptive_field: int = 11
coords_style: str = &quot;v2&quot;
ref_audio_offset: int = 1000
text_offset: int = 0

# Video CFG step-dependent guidance: low-t steps use a relaxed scale.
# Upstream daVinci-MagiHuman/inference/pipeline/video_generate.py:426
# uses 5.0 for high-t and 2.0 for low-t with cutoff at t=500.
video_guidance_high_t_threshold: int = 500
video_guidance_low_t_value: float = 2.0

def __post_init__(self) -&gt; None:
    # Base text-to-AV does not need the VAE encoder (no reference-image
    # conditioning). Keep decoder only to save memory.
    self.vae_config.load_encoder = False
    self.vae_config.load_decoder = True</code></pre></details>

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanBaseI2VConfig

MagiHumanBaseI2VConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = MagiHumanVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (T5GemmaEncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.Tensor], ...] = (lambda: (t5gemma_postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None, audio_vae_config: VAEConfig = OobleckVAEConfig(), precision: str = 'bf16', t5_gemma_target_length: int = 640, fps: int = 25, num_inference_steps: int = 32, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 2, vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, frame_receptive_field: int = 11, coords_style: str = 'v2', ref_audio_offset: int = 1000, text_offset: int = 0, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0, image_conditioning: bool = True)

Base MagiHuman text+image-to-AV pipeline config.

TI2V reuses the T2V DiT weights; the only pipeline-side difference is that a reference image is encoded with the Wan VAE and reinserted into the first video-latent frame before every denoise step.

Source
@dataclass
class MagiHumanBaseI2VConfig(MagiHumanBaseConfig):
    """Base MagiHuman text+image-to-AV pipeline config.
TI2V reuses the T2V DiT weights; the only pipeline-side difference is
that a reference image is encoded with the Wan VAE and reinserted into
the first video-latent frame before every denoise step.
&quot;&quot;&quot;

image_conditioning: bool = True

def __post_init__(self) -&gt; None:
    self.vae_config.load_encoder = True
    self.vae_config.load_decoder = True</code></pre></details>

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanDistillConfig

MagiHumanDistillConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = MagiHumanVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (T5GemmaEncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.Tensor], ...] = (lambda: (t5gemma_postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None, audio_vae_config: VAEConfig = OobleckVAEConfig(), precision: str = 'bf16', t5_gemma_target_length: int = 640, fps: int = 25, num_inference_steps: int = 8, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 1, vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, frame_receptive_field: int = 11, coords_style: str = 'v2', ref_audio_offset: int = 1000, text_offset: int = 0, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0)

DMD-2 distilled MagiHuman text-to-AV pipeline config.

Same arch as base (identical 331 keys, same shapes, same module tree), but trained via DMD-2 for 8-step inference without classifier-free guidance. Weights are stored in fp32 upstream; the conversion script's --cast-bf16 flag reduces the checkpoint to ~30 GB on disk.

Source
@dataclass
class MagiHumanDistillConfig(MagiHumanBaseConfig):
    """DMD-2 distilled MagiHuman text-to-AV pipeline config.
Same arch as base (identical 331 keys, same shapes, same module tree),
but trained via DMD-2 for 8-step inference without classifier-free
guidance. Weights are stored in fp32 upstream; the conversion script&#x27;s
`--cast-bf16` flag reduces the checkpoint to ~30 GB on disk.
&quot;&quot;&quot;

num_inference_steps: int = 8
cfg_number: int = 1  # DMD distilled models skip CFG.
# Lower flow_shift matches the distilled DMD schedule; if parity later
# shows drift, measure against `scheduler_config.json` generated by the
# conversion script for the distill subfolder.
flow_shift: float | None = 5.0</code></pre></details>

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanDistillI2VConfig

MagiHumanDistillI2VConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = MagiHumanVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (T5GemmaEncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.Tensor], ...] = (lambda: (t5gemma_postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None, audio_vae_config: VAEConfig = OobleckVAEConfig(), precision: str = 'bf16', t5_gemma_target_length: int = 640, fps: int = 25, num_inference_steps: int = 8, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 1, vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, frame_receptive_field: int = 11, coords_style: str = 'v2', ref_audio_offset: int = 1000, text_offset: int = 0, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0, image_conditioning: bool = True)

DMD-2 distilled MagiHuman text+image-to-AV pipeline config.

Source
@dataclass
class MagiHumanDistillI2VConfig(MagiHumanDistillConfig):
    """DMD-2 distilled MagiHuman text+image-to-AV pipeline config."""
image_conditioning: bool = True

def __post_init__(self) -&gt; None:
    self.vae_config.load_encoder = True
    self.vae_config.load_decoder = True</code></pre></details>

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanSR540pConfig

MagiHumanSR540pConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = MagiHumanVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (T5GemmaEncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.Tensor], ...] = (lambda: (t5gemma_postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None, audio_vae_config: VAEConfig = OobleckVAEConfig(), precision: str = 'bf16', t5_gemma_target_length: int = 640, fps: int = 25, num_inference_steps: int = 32, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 2, vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, frame_receptive_field: int = 11, coords_style: str = 'v2', ref_audio_offset: int = 1000, text_offset: int = 0, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0, noise_value: int = 220, sr_audio_noise_scale: float = 0.7, sr_num_inference_steps: int = 5, sr_video_txt_guidance_scale: float = 3.5, use_cfg_trick: bool = True, cfg_trick_start_frame: int = 13, cfg_trick_value: float = 2.0, sr_height: int = 512, sr_width: int = 896, sr_local_attn_layers: tuple[int, ...] = ())

Two-stage MagiHuman base + SR-540p text-to-AV pipeline config.

Source
@dataclass
class MagiHumanSR540pConfig(MagiHumanBaseConfig):
    """Two-stage MagiHuman base + SR-540p text-to-AV pipeline config."""
noise_value: int = 220
sr_audio_noise_scale: float = 0.7
sr_num_inference_steps: int = 5
sr_video_txt_guidance_scale: float = 3.5
use_cfg_trick: bool = True
cfg_trick_start_frame: int = 13
cfg_trick_value: float = 2.0
# Upstream example/sr_540p uses sr_height=512, sr_width=896. Despite the
# marketing name, these are the VAE/patch-aligned dimensions actually run.
sr_height: int = 512
sr_width: int = 896
sr_local_attn_layers: tuple&#91;int, ...&#93; = ()</code></pre></details>

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanSR540pI2VConfig

MagiHumanSR540pI2VConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = MagiHumanVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (T5GemmaEncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.Tensor], ...] = (lambda: (t5gemma_postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None, audio_vae_config: VAEConfig = OobleckVAEConfig(), precision: str = 'bf16', t5_gemma_target_length: int = 640, fps: int = 25, num_inference_steps: int = 32, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 2, vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, frame_receptive_field: int = 11, coords_style: str = 'v2', ref_audio_offset: int = 1000, text_offset: int = 0, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0, noise_value: int = 220, sr_audio_noise_scale: float = 0.7, sr_num_inference_steps: int = 5, sr_video_txt_guidance_scale: float = 3.5, use_cfg_trick: bool = True, cfg_trick_start_frame: int = 13, cfg_trick_value: float = 2.0, sr_height: int = 512, sr_width: int = 896, sr_local_attn_layers: tuple[int, ...] = (), image_conditioning: bool = True)

Two-stage MagiHuman base + SR-540p text+image-to-AV config.

Source
@dataclass
class MagiHumanSR540pI2VConfig(MagiHumanSR540pConfig):
    """Two-stage MagiHuman base + SR-540p text+image-to-AV config."""
image_conditioning: bool = True

def __post_init__(self) -&gt; None:
    self.vae_config.load_encoder = True
    self.vae_config.load_decoder = True</code></pre></details>

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanSR1080pConfig

MagiHumanSR1080pConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = MagiHumanVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (T5GemmaEncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.Tensor], ...] = (lambda: (t5gemma_postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None, audio_vae_config: VAEConfig = OobleckVAEConfig(), precision: str = 'bf16', t5_gemma_target_length: int = 640, fps: int = 25, num_inference_steps: int = 32, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 2, vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, frame_receptive_field: int = 11, coords_style: str = 'v2', ref_audio_offset: int = 1000, text_offset: int = 0, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0, noise_value: int = 220, sr_audio_noise_scale: float = 0.7, sr_num_inference_steps: int = 5, sr_video_txt_guidance_scale: float = 3.5, use_cfg_trick: bool = True, cfg_trick_start_frame: int = 13, cfg_trick_value: float = 2.0, sr_height: int = 1080, sr_width: int = 1920, sr_local_attn_layers: tuple[int, ...] = _SR_1080P_LOCAL_ATTN_LAYERS)

Two-stage MagiHuman base + SR-1080p text-to-AV pipeline config.

Source
@dataclass
class MagiHumanSR1080pConfig(MagiHumanSR540pConfig):
    """Two-stage MagiHuman base + SR-1080p text-to-AV pipeline config."""
sr_height: int = 1080
sr_width: int = 1920
sr_local_attn_layers: tuple&#91;int, ...&#93; = _SR_1080P_LOCAL_ATTN_LAYERS</code></pre></details>

fastvideo.pipelines.basic.magi_human.pipeline_configs.MagiHumanSR1080pI2VConfig

MagiHumanSR1080pI2VConfig(model_path: str = '', pipeline_config_path: str | None = None, embedded_cfg_scale: float = 6.0, flow_shift: float | None = 5.0, flow_shift_sr: float | None = None, disable_autocast: bool = False, scheduler_step_in_fp32: bool = False, is_causal: bool = False, dit_config: DiTConfig = MagiHumanVideoConfig(), dit_precision: str = 'bf16', upsampler_config: UpsamplerConfig = UpsamplerConfig(), upsampler_precision: str = 'fp32', vae_config: VAEConfig = WanVAEConfig(), vae_precision: str = 'fp32', vae_decode_precision: str | None = None, vae_tiling: bool = False, vae_sp: bool = False, image_encoder_config: EncoderConfig = EncoderConfig(), image_encoder_precision: str = 'fp32', image_encoder_configs: tuple[EncoderConfig, ...] | None = None, image_encoder_precisions: tuple[str, ...] | None = None, text_encoder_configs: tuple[EncoderConfig, ...] = (lambda: (T5GemmaEncoderConfig(),))(), text_encoder_precisions: tuple[str, ...] = (lambda: ('bf16',))(), preprocess_text_funcs: tuple[Callable[[str], str], ...] = (lambda: (preprocess_text,))(), postprocess_text_funcs: tuple[Callable[[BaseEncoderOutput], torch.Tensor], ...] = (lambda: (t5gemma_postprocess_text,))(), dmd_denoising_steps: list[int] | None = None, ti2v_task: bool = False, lucy_edit_task: bool = False, boundary_ratio: float | None = None, audio_vae_config: VAEConfig = OobleckVAEConfig(), precision: str = 'bf16', t5_gemma_target_length: int = 640, fps: int = 25, num_inference_steps: int = 32, video_txt_guidance_scale: float = 5.0, audio_txt_guidance_scale: float = 5.0, cfg_number: int = 2, vae_stride: tuple[int, int, int] = (4, 16, 16), z_dim: int = 48, frame_receptive_field: int = 11, coords_style: str = 'v2', ref_audio_offset: int = 1000, text_offset: int = 0, video_guidance_high_t_threshold: int = 500, video_guidance_low_t_value: float = 2.0, noise_value: int = 220, sr_audio_noise_scale: float = 0.7, sr_num_inference_steps: int = 5, sr_video_txt_guidance_scale: float = 3.5, use_cfg_trick: bool = True, cfg_trick_start_frame: int = 13, cfg_trick_value: float = 2.0, sr_height: int = 1080, sr_width: int = 1920, sr_local_attn_layers: tuple[int, ...] = _SR_1080P_LOCAL_ATTN_LAYERS, image_conditioning: bool = True)

Two-stage MagiHuman base + SR-1080p text+image-to-AV config.

Source
@dataclass
class MagiHumanSR1080pI2VConfig(MagiHumanSR1080pConfig):
    """Two-stage MagiHuman base + SR-1080p text+image-to-AV config."""
image_conditioning: bool = True

def __post_init__(self) -&gt; None:
    self.vae_config.load_encoder = True
    self.vae_config.load_decoder = True</code></pre></details>

Was this page helpful?