Skip to content

Commit 5418ca7

Browse files
support load wan2.1-fun-inp-1.3B and 14B model
1 parent 71eee78 commit 5418ca7

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

diffsynth/configs/model_config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@
120120
(None, "9269f8db9040a9d860eaca435be61814", ["wan_video_dit"], [WanModel], "civitai"),
121121
(None, "aafcfd9672c3a2456dc46e1cb6e52c70", ["wan_video_dit"], [WanModel], "civitai"),
122122
(None, "6bfcfb3b342cb286ce886889d519a77e", ["wan_video_dit"], [WanModel], "civitai"),
123+
(None, "6d6ccde6845b95ad9114ab993d917893", ["wan_video_dit"], [WanModel], "civitai"),
124+
(None, "6bfcfb3b342cb286ce886889d519a77e", ["wan_video_dit"], [WanModel], "civitai"),
123125
(None, "cb104773c6c2cb6df4f9529ad5c60d0b", ["wan_video_dit"], [WanModel], "diffusers"),
124126
(None, "9c8818c2cbea55eca56c7b447df170da", ["wan_video_text_encoder"], [WanTextEncoder], "civitai"),
125127
(None, "5941c53e207d62f20f9025686193c40b", ["wan_video_image_encoder"], [WanImageEncoder], "civitai"),

diffsynth/models/wan_video_dit.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,34 @@ def from_civitai(self, state_dict):
493493
"num_layers": 40,
494494
"eps": 1e-6
495495
}
496+
elif hash_state_dict_keys(state_dict) == "6d6ccde6845b95ad9114ab993d917893":
497+
config = {
498+
"has_image_input": True,
499+
"patch_size": [1, 2, 2],
500+
"in_dim": 36,
501+
"dim": 1536,
502+
"ffn_dim": 8960,
503+
"freq_dim": 256,
504+
"text_dim": 4096,
505+
"out_dim": 16,
506+
"num_heads": 12,
507+
"num_layers": 30,
508+
"eps": 1e-6
509+
}
510+
elif hash_state_dict_keys(state_dict) == "6bfcfb3b342cb286ce886889d519a77e":
511+
config = {
512+
"has_image_input": True,
513+
"patch_size": [1, 2, 2],
514+
"in_dim": 36,
515+
"dim": 5120,
516+
"ffn_dim": 13824,
517+
"freq_dim": 256,
518+
"text_dim": 4096,
519+
"out_dim": 16,
520+
"num_heads": 40,
521+
"num_layers": 40,
522+
"eps": 1e-6
523+
}
496524
else:
497525
config = {}
498526
return state_dict, config

0 commit comments

Comments
 (0)