vllm_omni.diffusion.models.magi2.pipeline_magi2 ¶
Native vLLM-Omni pipeline for sand-ai/MAGI-2-preview.
The model, packing, scheduler, checkpoint mapping, and decoder integration are owned by vLLM-Omni. SandAI's Apache-2.0 implementation was used as the accuracy reference, but is neither imported nor required at runtime.
This first native integration intentionally supports the released Preview stage (272p and 540p). The separately checkpointed 1080p refiner is not silently routed through an external implementation.
DEFAULT_NEGATIVE_PROMPT module-attribute ¶
DEFAULT_NEGATIVE_PROMPT = "Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards"
MAGI2_AUDIO_SAMPLE_RATE module-attribute ¶
MAGI2_AUDIO_SAMPLE_RATE = (
MAGI2_GENERATION_CONFIG.audio_sample_rate
)
MAGI2_MODEL_REVISION module-attribute ¶
Magi2Pipeline ¶
Bases: Module, ProgressBarMixin, SupportsComponentDiscovery, DiffusionPipelineProfilerMixin, SupportImageInput, SupportAudioOutput
Native MAGI-2 Preview text/image-to-video-and-audio pipeline.
One pipeline instance is supported per worker process. Initialization sets process-wide deterministic state, so tests or deployments that need more than one pipeline must isolate them in separate worker processes.
audio_decoder instance-attribute ¶
checkpoint_root instance-attribute ¶
checkpoint_root = _resolve_checkpoint_root(
str(od_config.model), od_config.revision
)
deterministic instance-attribute ¶
deterministic = _env_flag(
_config_value(
od_config,
"magi2_deterministic",
"MAGI2_DETERMINISTIC",
),
default=bool(
getattr(od_config, "fa_deterministic", False)
),
)
image_vae instance-attribute ¶
sampler instance-attribute ¶
sampler = Magi2PreviewSampler(
self.transformer,
self.data_proxy,
device=self.device_str,
dtype=self.dtype,
)
text_encoder instance-attribute ¶
video_decoder instance-attribute ¶
video_processor instance-attribute ¶
video_processor = VideoProcessor(
vae_scale_factor=2
* MAGI2_GENERATION_CONFIG.video_vae_stride[1]
)
weights_sources instance-attribute ¶
weights_sources = [
DiffusersPipelineLoader.ComponentSource(
model_or_path=self.checkpoint_root,
subfolder="preview",
revision=None,
prefix="transformer.",
fall_back_to_pt=False,
)
]
setup_compile ¶
Compile the transformer regions; the attention and MoE kernels stay eager.