Instructions to use wavespeed/MAGI-1-24B-distill-quant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use wavespeed/MAGI-1-24B-distill-quant with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("wavespeed/MAGI-1-24B-distill-quant", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - MAGI-1
How to use wavespeed/MAGI-1-24B-distill-quant with MAGI-1:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image, export_to_video
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("wavespeed/MAGI-1-24B-distill-quant", dtype=torch.bfloat16, device_map="cuda")
pipe.to("cuda")
prompt = "A man with short gray hair plays a red electric guitar."
image = load_image(
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png"
)
output = pipe(image=image, prompt=prompt).frames[0]
export_to_video(output, "output.mp4")MAGI-1-24B-distill-quant
The FP8-quantized, distilled 24B variant of MAGI-1, packaged with the T5-v1.1-XXL text encoder and VAE it needs to run.
MAGI-1 is an autoregressive video model: it generates a video chunk by chunk, which lets it stream output and extend a clip indefinitely rather than committing to a fixed frame count up front.
Layout
24B_distill_quant/inference_weight.fp8.distill/ fp8 transformer, 3 shards
t5_pretrained/t5-v1_1-xxl/ text encoder
vae/ MAGI-1 ViT VAE
Usage
These are raw checkpoint files for the reference implementation at sand-ai/MAGI-1, not a diffusers pipeline. Point the repo's inference config at the directories above:
huggingface-cli download wavespeed/MAGI-1-24B-distill-quant --local-dir ./MAGI-1
then set load to ./MAGI-1/24B_distill_quant/inference_weight.fp8.distill,
t5_pretrained to ./MAGI-1/t5_pretrained/t5-v1_1-xxl and vae_pretrained to
./MAGI-1/vae in the runtime config.
The distill weights are the few-step distilled variant — use the step count
the upstream distill config specifies, not the base model's.
License
Apache-2.0, inherited from MAGI-1.
- Downloads last month
- -
Model tree for wavespeed/MAGI-1-24B-distill-quant
Base model
sand-ai/MAGI-1