| 707 | |
| 708 | |
| 709 | class WanModelStateDictConverter: |
| 710 | def __init__(self): |
| 711 | pass |
| 712 | |
| 713 | def from_diffusers(self, state_dict): |
| 714 | return state_dict |
| 715 | |
| 716 | def from_civitai(self, state_dict): |
| 717 | if hash_state_dict_keys(state_dict) == "9269f8db9040a9d860eaca435be61814": |
| 718 | config = { |
| 719 | "model_type": "t2v", |
| 720 | "patch_size": (1, 2, 2), |
| 721 | "text_len": 512, |
| 722 | "in_dim": 16, |
| 723 | "dim": 1536, |
| 724 | "ffn_dim": 8960, |
| 725 | "freq_dim": 256, |
| 726 | "text_dim": 4096, |
| 727 | "out_dim": 16, |
| 728 | "num_heads": 12, |
| 729 | "num_layers": 30, |
| 730 | "window_size": (-1, -1), |
| 731 | "qk_norm": True, |
| 732 | "cross_attn_norm": True, |
| 733 | "eps": 1e-6, |
| 734 | } |
| 735 | elif hash_state_dict_keys(state_dict) == "aafcfd9672c3a2456dc46e1cb6e52c70": |
| 736 | config = { |
| 737 | "model_type": "t2v", |
| 738 | "patch_size": (1, 2, 2), |
| 739 | "text_len": 512, |
| 740 | "in_dim": 16, |
| 741 | "dim": 5120, |
| 742 | "ffn_dim": 13824, |
| 743 | "freq_dim": 256, |
| 744 | "text_dim": 4096, |
| 745 | "out_dim": 16, |
| 746 | "num_heads": 40, |
| 747 | "num_layers": 40, |
| 748 | "window_size": (-1, -1), |
| 749 | "qk_norm": True, |
| 750 | "cross_attn_norm": True, |
| 751 | "eps": 1e-6, |
| 752 | } |
| 753 | elif hash_state_dict_keys(state_dict) == "6bfcfb3b342cb286ce886889d519a77e": |
| 754 | config = { |
| 755 | "model_type": "i2v", |
| 756 | "patch_size": (1, 2, 2), |
| 757 | "text_len": 512, |
| 758 | "in_dim": 36, |
| 759 | "dim": 5120, |
| 760 | "ffn_dim": 13824, |
| 761 | "freq_dim": 256, |
| 762 | "text_dim": 4096, |
| 763 | "out_dim": 16, |
| 764 | "num_heads": 40, |
| 765 | "num_layers": 40, |
| 766 | "window_size": (-1, -1), |
no outgoing calls
no test coverage detected