Instructions to use hf-internal-testing/tiny-wan-animate-2-modular with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hf-internal-testing/tiny-wan-animate-2-modular with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hf-internal-testing/tiny-wan-animate-2-modular", 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 tiny Wan-Animate-2 test components
Browse files- image_encoder/config.json +21 -0
- image_encoder/model.safetensors +3 -0
- model_index.json +28 -0
- scheduler/scheduler_config.json +18 -0
- text_encoder/config.json +34 -0
- text_encoder/model.safetensors +3 -0
- tokenizer/tokenizer.json +0 -0
- tokenizer/tokenizer_config.json +113 -0
- transformer/config.json +25 -0
- transformer/diffusion_pytorch_model.safetensors +3 -0
- vae/config.json +63 -0
- vae/diffusion_pytorch_model.safetensors +3 -0
image_encoder/config.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"CLIPVisionModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"dtype": "float32",
|
| 7 |
+
"hidden_act": "quick_gelu",
|
| 8 |
+
"hidden_size": 1280,
|
| 9 |
+
"image_size": 224,
|
| 10 |
+
"initializer_factor": 1.0,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 64,
|
| 13 |
+
"layer_norm_eps": 1e-05,
|
| 14 |
+
"model_type": "clip_vision_model",
|
| 15 |
+
"num_attention_heads": 8,
|
| 16 |
+
"num_channels": 3,
|
| 17 |
+
"num_hidden_layers": 2,
|
| 18 |
+
"patch_size": 56,
|
| 19 |
+
"projection_dim": 16,
|
| 20 |
+
"transformers_version": "5.14.1"
|
| 21 |
+
}
|
image_encoder/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bd1a119afb8e2973dc17a9bbf84ae496a0d77dc0be54f18af97b102a09bb432a
|
| 3 |
+
size 102117896
|
model_index.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "WanAnimate2Pipeline",
|
| 3 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 4 |
+
"image_encoder": [
|
| 5 |
+
"transformers",
|
| 6 |
+
"CLIPVisionModel"
|
| 7 |
+
],
|
| 8 |
+
"scheduler": [
|
| 9 |
+
"diffusers",
|
| 10 |
+
"FlowMatchEulerDiscreteScheduler"
|
| 11 |
+
],
|
| 12 |
+
"text_encoder": [
|
| 13 |
+
"transformers",
|
| 14 |
+
"T5EncoderModel"
|
| 15 |
+
],
|
| 16 |
+
"tokenizer": [
|
| 17 |
+
"transformers",
|
| 18 |
+
"T5Tokenizer"
|
| 19 |
+
],
|
| 20 |
+
"transformer": [
|
| 21 |
+
"diffusers",
|
| 22 |
+
"WanAnimate2Transformer3DModel"
|
| 23 |
+
],
|
| 24 |
+
"vae": [
|
| 25 |
+
"diffusers",
|
| 26 |
+
"AutoencoderKLWan"
|
| 27 |
+
]
|
| 28 |
+
}
|
scheduler/scheduler_config.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "FlowMatchEulerDiscreteScheduler",
|
| 3 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 4 |
+
"base_image_seq_len": 256,
|
| 5 |
+
"base_shift": 0.5,
|
| 6 |
+
"invert_sigmas": false,
|
| 7 |
+
"max_image_seq_len": 4096,
|
| 8 |
+
"max_shift": 1.15,
|
| 9 |
+
"num_train_timesteps": 1000,
|
| 10 |
+
"shift": 5.0,
|
| 11 |
+
"shift_terminal": null,
|
| 12 |
+
"stochastic_sampling": false,
|
| 13 |
+
"time_shift_type": "exponential",
|
| 14 |
+
"use_beta_sigmas": false,
|
| 15 |
+
"use_dynamic_shifting": false,
|
| 16 |
+
"use_exponential_sigmas": false,
|
| 17 |
+
"use_karras_sigmas": false
|
| 18 |
+
}
|
text_encoder/config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"T5EncoderModel"
|
| 4 |
+
],
|
| 5 |
+
"bos_token_id": 0,
|
| 6 |
+
"classifier_dropout": 0.0,
|
| 7 |
+
"d_ff": 37,
|
| 8 |
+
"d_kv": 8,
|
| 9 |
+
"d_model": 32,
|
| 10 |
+
"decoder_start_token_id": 0,
|
| 11 |
+
"dense_act_fn": "relu",
|
| 12 |
+
"dropout_rate": 0.1,
|
| 13 |
+
"dtype": "float32",
|
| 14 |
+
"eos_token_id": 1,
|
| 15 |
+
"feed_forward_proj": "relu",
|
| 16 |
+
"gradient_checkpointing": false,
|
| 17 |
+
"initializer_factor": 0.002,
|
| 18 |
+
"is_decoder": false,
|
| 19 |
+
"is_encoder_decoder": false,
|
| 20 |
+
"is_gated_act": false,
|
| 21 |
+
"layer_norm_epsilon": 1e-06,
|
| 22 |
+
"model_type": "t5",
|
| 23 |
+
"num_decoder_layers": 5,
|
| 24 |
+
"num_heads": 4,
|
| 25 |
+
"num_layers": 5,
|
| 26 |
+
"pad_token_id": 0,
|
| 27 |
+
"relative_attention_max_distance": 128,
|
| 28 |
+
"relative_attention_num_buckets": 8,
|
| 29 |
+
"scale_decoder_outputs": true,
|
| 30 |
+
"tie_word_embeddings": true,
|
| 31 |
+
"transformers_version": "5.14.1",
|
| 32 |
+
"use_cache": false,
|
| 33 |
+
"vocab_size": 1103
|
| 34 |
+
}
|
text_encoder/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:54dadb55b583429729a927c6520359f6fba1d24fdae620ea839a96aeb3a84dbf
|
| 3 |
+
size 276696
|
tokenizer/tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer/tokenizer_config.json
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"eos_token": "</s>",
|
| 4 |
+
"extra_ids": 100,
|
| 5 |
+
"extra_special_tokens": [
|
| 6 |
+
"<extra_id_0>",
|
| 7 |
+
"<extra_id_1>",
|
| 8 |
+
"<extra_id_2>",
|
| 9 |
+
"<extra_id_3>",
|
| 10 |
+
"<extra_id_4>",
|
| 11 |
+
"<extra_id_5>",
|
| 12 |
+
"<extra_id_6>",
|
| 13 |
+
"<extra_id_7>",
|
| 14 |
+
"<extra_id_8>",
|
| 15 |
+
"<extra_id_9>",
|
| 16 |
+
"<extra_id_10>",
|
| 17 |
+
"<extra_id_11>",
|
| 18 |
+
"<extra_id_12>",
|
| 19 |
+
"<extra_id_13>",
|
| 20 |
+
"<extra_id_14>",
|
| 21 |
+
"<extra_id_15>",
|
| 22 |
+
"<extra_id_16>",
|
| 23 |
+
"<extra_id_17>",
|
| 24 |
+
"<extra_id_18>",
|
| 25 |
+
"<extra_id_19>",
|
| 26 |
+
"<extra_id_20>",
|
| 27 |
+
"<extra_id_21>",
|
| 28 |
+
"<extra_id_22>",
|
| 29 |
+
"<extra_id_23>",
|
| 30 |
+
"<extra_id_24>",
|
| 31 |
+
"<extra_id_25>",
|
| 32 |
+
"<extra_id_26>",
|
| 33 |
+
"<extra_id_27>",
|
| 34 |
+
"<extra_id_28>",
|
| 35 |
+
"<extra_id_29>",
|
| 36 |
+
"<extra_id_30>",
|
| 37 |
+
"<extra_id_31>",
|
| 38 |
+
"<extra_id_32>",
|
| 39 |
+
"<extra_id_33>",
|
| 40 |
+
"<extra_id_34>",
|
| 41 |
+
"<extra_id_35>",
|
| 42 |
+
"<extra_id_36>",
|
| 43 |
+
"<extra_id_37>",
|
| 44 |
+
"<extra_id_38>",
|
| 45 |
+
"<extra_id_39>",
|
| 46 |
+
"<extra_id_40>",
|
| 47 |
+
"<extra_id_41>",
|
| 48 |
+
"<extra_id_42>",
|
| 49 |
+
"<extra_id_43>",
|
| 50 |
+
"<extra_id_44>",
|
| 51 |
+
"<extra_id_45>",
|
| 52 |
+
"<extra_id_46>",
|
| 53 |
+
"<extra_id_47>",
|
| 54 |
+
"<extra_id_48>",
|
| 55 |
+
"<extra_id_49>",
|
| 56 |
+
"<extra_id_50>",
|
| 57 |
+
"<extra_id_51>",
|
| 58 |
+
"<extra_id_52>",
|
| 59 |
+
"<extra_id_53>",
|
| 60 |
+
"<extra_id_54>",
|
| 61 |
+
"<extra_id_55>",
|
| 62 |
+
"<extra_id_56>",
|
| 63 |
+
"<extra_id_57>",
|
| 64 |
+
"<extra_id_58>",
|
| 65 |
+
"<extra_id_59>",
|
| 66 |
+
"<extra_id_60>",
|
| 67 |
+
"<extra_id_61>",
|
| 68 |
+
"<extra_id_62>",
|
| 69 |
+
"<extra_id_63>",
|
| 70 |
+
"<extra_id_64>",
|
| 71 |
+
"<extra_id_65>",
|
| 72 |
+
"<extra_id_66>",
|
| 73 |
+
"<extra_id_67>",
|
| 74 |
+
"<extra_id_68>",
|
| 75 |
+
"<extra_id_69>",
|
| 76 |
+
"<extra_id_70>",
|
| 77 |
+
"<extra_id_71>",
|
| 78 |
+
"<extra_id_72>",
|
| 79 |
+
"<extra_id_73>",
|
| 80 |
+
"<extra_id_74>",
|
| 81 |
+
"<extra_id_75>",
|
| 82 |
+
"<extra_id_76>",
|
| 83 |
+
"<extra_id_77>",
|
| 84 |
+
"<extra_id_78>",
|
| 85 |
+
"<extra_id_79>",
|
| 86 |
+
"<extra_id_80>",
|
| 87 |
+
"<extra_id_81>",
|
| 88 |
+
"<extra_id_82>",
|
| 89 |
+
"<extra_id_83>",
|
| 90 |
+
"<extra_id_84>",
|
| 91 |
+
"<extra_id_85>",
|
| 92 |
+
"<extra_id_86>",
|
| 93 |
+
"<extra_id_87>",
|
| 94 |
+
"<extra_id_88>",
|
| 95 |
+
"<extra_id_89>",
|
| 96 |
+
"<extra_id_90>",
|
| 97 |
+
"<extra_id_91>",
|
| 98 |
+
"<extra_id_92>",
|
| 99 |
+
"<extra_id_93>",
|
| 100 |
+
"<extra_id_94>",
|
| 101 |
+
"<extra_id_95>",
|
| 102 |
+
"<extra_id_96>",
|
| 103 |
+
"<extra_id_97>",
|
| 104 |
+
"<extra_id_98>",
|
| 105 |
+
"<extra_id_99>"
|
| 106 |
+
],
|
| 107 |
+
"is_local": false,
|
| 108 |
+
"local_files_only": false,
|
| 109 |
+
"model_max_length": 1024,
|
| 110 |
+
"pad_token": "<pad>",
|
| 111 |
+
"tokenizer_class": "T5Tokenizer",
|
| 112 |
+
"unk_token": "<unk>"
|
| 113 |
+
}
|
transformer/config.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "WanAnimate2Transformer3DModel",
|
| 3 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 4 |
+
"cross_attn_norm": true,
|
| 5 |
+
"dim": 128,
|
| 6 |
+
"eps": 1e-06,
|
| 7 |
+
"ffn_dim": 256,
|
| 8 |
+
"freq_dim": 64,
|
| 9 |
+
"in_dim": 36,
|
| 10 |
+
"num_heads": 4,
|
| 11 |
+
"num_layers": 2,
|
| 12 |
+
"out_dim": 16,
|
| 13 |
+
"patch_size": [
|
| 14 |
+
1,
|
| 15 |
+
2,
|
| 16 |
+
2
|
| 17 |
+
],
|
| 18 |
+
"refer_offset_h": 0,
|
| 19 |
+
"refer_offset_t": 1,
|
| 20 |
+
"refer_offset_w": -1,
|
| 21 |
+
"refer_stride": 1,
|
| 22 |
+
"text_dim": 32,
|
| 23 |
+
"text_len": 16,
|
| 24 |
+
"use_img_emb": true
|
| 25 |
+
}
|
transformer/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bae13913910cc07e2f22b88e76a65e04579ab9f6f9b621788fff55b5462bd132
|
| 3 |
+
size 9782536
|
vae/config.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_class_name": "AutoencoderKLWan",
|
| 3 |
+
"_diffusers_version": "0.40.0.dev0",
|
| 4 |
+
"attn_scales": [],
|
| 5 |
+
"base_dim": 3,
|
| 6 |
+
"decoder_base_dim": null,
|
| 7 |
+
"dim_mult": [
|
| 8 |
+
1,
|
| 9 |
+
1,
|
| 10 |
+
1,
|
| 11 |
+
1
|
| 12 |
+
],
|
| 13 |
+
"dropout": 0.0,
|
| 14 |
+
"in_channels": 3,
|
| 15 |
+
"is_residual": false,
|
| 16 |
+
"latents_mean": [
|
| 17 |
+
-0.7571,
|
| 18 |
+
-0.7089,
|
| 19 |
+
-0.9113,
|
| 20 |
+
0.1075,
|
| 21 |
+
-0.1745,
|
| 22 |
+
0.9653,
|
| 23 |
+
-0.1517,
|
| 24 |
+
1.5508,
|
| 25 |
+
0.4134,
|
| 26 |
+
-0.0715,
|
| 27 |
+
0.5517,
|
| 28 |
+
-0.3632,
|
| 29 |
+
-0.1922,
|
| 30 |
+
-0.9497,
|
| 31 |
+
0.2503,
|
| 32 |
+
-0.2921
|
| 33 |
+
],
|
| 34 |
+
"latents_std": [
|
| 35 |
+
2.8184,
|
| 36 |
+
1.4541,
|
| 37 |
+
2.3275,
|
| 38 |
+
2.6558,
|
| 39 |
+
1.2196,
|
| 40 |
+
1.7708,
|
| 41 |
+
2.6052,
|
| 42 |
+
2.0743,
|
| 43 |
+
3.2687,
|
| 44 |
+
2.1526,
|
| 45 |
+
2.8652,
|
| 46 |
+
1.5579,
|
| 47 |
+
1.6382,
|
| 48 |
+
1.1253,
|
| 49 |
+
2.8251,
|
| 50 |
+
1.916
|
| 51 |
+
],
|
| 52 |
+
"num_res_blocks": 1,
|
| 53 |
+
"out_channels": 3,
|
| 54 |
+
"patch_size": null,
|
| 55 |
+
"scale_factor_spatial": 8,
|
| 56 |
+
"scale_factor_temporal": 4,
|
| 57 |
+
"temperal_downsample": [
|
| 58 |
+
false,
|
| 59 |
+
true,
|
| 60 |
+
true
|
| 61 |
+
],
|
| 62 |
+
"z_dim": 16
|
| 63 |
+
}
|
vae/diffusion_pytorch_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5972574afb9fc4993b642cb305ba81712d84e25e8969c5268d847c7164322f2f
|
| 3 |
+
size 70404
|