Instructions to use nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("nvidia/AnyFlow-Wan2.1-T2V-1.3B-Diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Add files using upload-large-folder tool
Browse files- model_index.json +5 -5
- scheduler/scheduler_config.json +2 -3
- transformer/config.json +1 -12
model_index.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
{
|
| 2 |
-
"_class_name": "
|
| 3 |
"_diffusers_version": "0.35.1",
|
| 4 |
"_name_or_path": "Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
|
| 5 |
"scheduler": [
|
| 6 |
-
"
|
| 7 |
-
"
|
| 8 |
],
|
| 9 |
"text_encoder": [
|
| 10 |
"transformers",
|
|
@@ -15,8 +15,8 @@
|
|
| 15 |
"T5TokenizerFast"
|
| 16 |
],
|
| 17 |
"transformer": [
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
],
|
| 21 |
"vae": [
|
| 22 |
"diffusers",
|
|
|
|
| 1 |
{
|
| 2 |
+
"_class_name": "AnyFlowPipeline",
|
| 3 |
"_diffusers_version": "0.35.1",
|
| 4 |
"_name_or_path": "Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
|
| 5 |
"scheduler": [
|
| 6 |
+
"diffusers",
|
| 7 |
+
"FlowMapEulerDiscreteScheduler"
|
| 8 |
],
|
| 9 |
"text_encoder": [
|
| 10 |
"transformers",
|
|
|
|
| 15 |
"T5TokenizerFast"
|
| 16 |
],
|
| 17 |
"transformer": [
|
| 18 |
+
"diffusers",
|
| 19 |
+
"AnyFlowTransformer3DModel"
|
| 20 |
],
|
| 21 |
"vae": [
|
| 22 |
"diffusers",
|
scheduler/scheduler_config.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
{
|
| 2 |
-
"_class_name": "
|
| 3 |
"_diffusers_version": "0.35.1",
|
| 4 |
"num_train_timesteps": 1000,
|
| 5 |
-
"shift": 5
|
| 6 |
-
"weight_type": "gaussian"
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_class_name": "FlowMapEulerDiscreteScheduler",
|
| 3 |
"_diffusers_version": "0.35.1",
|
| 4 |
"num_train_timesteps": 1000,
|
| 5 |
+
"shift": 5
|
|
|
|
| 6 |
}
|
transformer/config.json
CHANGED
|
@@ -1,26 +1,16 @@
|
|
| 1 |
{
|
| 2 |
-
"_class_name": "
|
| 3 |
"_diffusers_version": "0.35.1",
|
| 4 |
"_name_or_path": "Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
|
| 5 |
-
"added_kv_proj_dim": null,
|
| 6 |
"attention_head_dim": 128,
|
| 7 |
-
"chunk_partition": null,
|
| 8 |
-
"compressed_patch_size": [
|
| 9 |
-
1,
|
| 10 |
-
4,
|
| 11 |
-
4
|
| 12 |
-
],
|
| 13 |
"cross_attn_norm": true,
|
| 14 |
"deltatime_type": "r",
|
| 15 |
"eps": 1e-06,
|
| 16 |
"ffn_dim": 8960,
|
| 17 |
"freq_dim": 256,
|
| 18 |
-
"full_chunk_limit": 3,
|
| 19 |
"gate_value": 0.25,
|
| 20 |
"image_dim": null,
|
| 21 |
"in_channels": 16,
|
| 22 |
-
"init_far_model": false,
|
| 23 |
-
"init_flowmap_model": true,
|
| 24 |
"num_attention_heads": 12,
|
| 25 |
"num_layers": 30,
|
| 26 |
"out_channels": 16,
|
|
@@ -29,7 +19,6 @@
|
|
| 29 |
2,
|
| 30 |
2
|
| 31 |
],
|
| 32 |
-
"qk_norm": "rms_norm_across_heads",
|
| 33 |
"rope_max_seq_len": 1024,
|
| 34 |
"text_dim": 4096
|
| 35 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_class_name": "AnyFlowTransformer3DModel",
|
| 3 |
"_diffusers_version": "0.35.1",
|
| 4 |
"_name_or_path": "Wan-AI/Wan2.1-T2V-1.3B-Diffusers",
|
|
|
|
| 5 |
"attention_head_dim": 128,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
"cross_attn_norm": true,
|
| 7 |
"deltatime_type": "r",
|
| 8 |
"eps": 1e-06,
|
| 9 |
"ffn_dim": 8960,
|
| 10 |
"freq_dim": 256,
|
|
|
|
| 11 |
"gate_value": 0.25,
|
| 12 |
"image_dim": null,
|
| 13 |
"in_channels": 16,
|
|
|
|
|
|
|
| 14 |
"num_attention_heads": 12,
|
| 15 |
"num_layers": 30,
|
| 16 |
"out_channels": 16,
|
|
|
|
| 19 |
2,
|
| 20 |
2
|
| 21 |
],
|
|
|
|
| 22 |
"rope_max_seq_len": 1024,
|
| 23 |
"text_dim": 4096
|
| 24 |
}
|