Instructions to use yanboding/MTVCrafter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use yanboding/MTVCrafter 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("yanboding/MTVCrafter", 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
Upload config.json
#3
by meteorite2023 - opened
- config.json +29 -0
config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "WanTransformer3DModelMoCn",
|
| 3 |
+
"_diffusers_version": "0.31.0",
|
| 4 |
+
"cross_attn_norm": true,
|
| 5 |
+
"dim": 5120,
|
| 6 |
+
"eps": 1e-06,
|
| 7 |
+
"ffn_dim": 13824,
|
| 8 |
+
"freq_dim": 256,
|
| 9 |
+
"hidden_size": 5120,
|
| 10 |
+
"in_channels": 36,
|
| 11 |
+
"in_dim": 36,
|
| 12 |
+
"model_type": "i2v",
|
| 13 |
+
"num_heads": 40,
|
| 14 |
+
"num_layers": 40,
|
| 15 |
+
"out_dim": 16,
|
| 16 |
+
"patch_size": [
|
| 17 |
+
1,
|
| 18 |
+
2,
|
| 19 |
+
2
|
| 20 |
+
],
|
| 21 |
+
"qk_norm": true,
|
| 22 |
+
"text_dim": 4096,
|
| 23 |
+
"text_len": 512,
|
| 24 |
+
"use_2d": false,
|
| 25 |
+
"window_size": [
|
| 26 |
+
-1,
|
| 27 |
+
-1
|
| 28 |
+
]
|
| 29 |
+
}
|