Instructions to use Skywork/Matrix-Game-2.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Skywork/Matrix-Game-2.0 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("Skywork/Matrix-Game-2.0", 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") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_class_name": "WanModel", | |
| "_diffusers_version": "0.33.1", | |
| "action_config": { | |
| "blocks": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], | |
| "enable_keyboard": true, | |
| "enable_mouse": true, | |
| "heads_num": 16, | |
| "hidden_size": 128, | |
| "img_hidden_size": 1536, | |
| "keyboard_dim_in": 4, | |
| "keyboard_hidden_dim": 1024, | |
| "mouse_dim_in": 2, | |
| "mouse_hidden_dim": 1024, | |
| "mouse_qk_dim_list": [ | |
| 8, | |
| 28, | |
| 28 | |
| ], | |
| "patch_size": [ | |
| 1, | |
| 2, | |
| 2 | |
| ], | |
| "qk_norm": true, | |
| "qkv_bias": false, | |
| "rope_dim_list": [ | |
| 8, | |
| 28, | |
| 28 | |
| ], | |
| "rope_theta": 256, | |
| "vae_time_compression_ratio": 4, | |
| "windows_size": 3 | |
| }, | |
| "dim": 1536, | |
| "eps": 1e-06, | |
| "ffn_dim": 8960, | |
| "freq_dim": 256, | |
| "in_dim": 36, | |
| "inject_sample_info": false, | |
| "model_type": "i2v", | |
| "num_heads": 12, | |
| "num_layers": 30, | |
| "out_dim": 16, | |
| "text_len": 512 | |
| } | |