(model_type: str)
| 82 | |
| 83 | |
| 84 | def get_transformer_config(model_type: str) -> dict[str, Any]: |
| 85 | if model_type == "SkyReels-V2-DF-1.3B-540P": |
| 86 | config = { |
| 87 | "model_id": "Skywork/SkyReels-V2-DF-1.3B-540P", |
| 88 | "diffusers_config": { |
| 89 | "added_kv_proj_dim": None, |
| 90 | "attention_head_dim": 128, |
| 91 | "cross_attn_norm": True, |
| 92 | "eps": 1e-06, |
| 93 | "ffn_dim": 8960, |
| 94 | "freq_dim": 256, |
| 95 | "in_channels": 16, |
| 96 | "num_attention_heads": 12, |
| 97 | "inject_sample_info": True, |
| 98 | "num_layers": 30, |
| 99 | "out_channels": 16, |
| 100 | "patch_size": [1, 2, 2], |
| 101 | "qk_norm": "rms_norm_across_heads", |
| 102 | "text_dim": 4096, |
| 103 | }, |
| 104 | } |
| 105 | elif model_type == "SkyReels-V2-DF-14B-720P": |
| 106 | config = { |
| 107 | "model_id": "Skywork/SkyReels-V2-DF-14B-720P", |
| 108 | "diffusers_config": { |
| 109 | "added_kv_proj_dim": None, |
| 110 | "attention_head_dim": 128, |
| 111 | "cross_attn_norm": True, |
| 112 | "eps": 1e-06, |
| 113 | "ffn_dim": 13824, |
| 114 | "freq_dim": 256, |
| 115 | "in_channels": 16, |
| 116 | "num_attention_heads": 40, |
| 117 | "inject_sample_info": False, |
| 118 | "num_layers": 40, |
| 119 | "out_channels": 16, |
| 120 | "patch_size": [1, 2, 2], |
| 121 | "qk_norm": "rms_norm_across_heads", |
| 122 | "text_dim": 4096, |
| 123 | }, |
| 124 | } |
| 125 | elif model_type == "SkyReels-V2-DF-14B-540P": |
| 126 | config = { |
| 127 | "model_id": "Skywork/SkyReels-V2-DF-14B-540P", |
| 128 | "diffusers_config": { |
| 129 | "added_kv_proj_dim": None, |
| 130 | "attention_head_dim": 128, |
| 131 | "cross_attn_norm": True, |
| 132 | "eps": 1e-06, |
| 133 | "ffn_dim": 13824, |
| 134 | "freq_dim": 256, |
| 135 | "in_channels": 16, |
| 136 | "num_attention_heads": 40, |
| 137 | "inject_sample_info": False, |
| 138 | "num_layers": 40, |
| 139 | "out_channels": 16, |
| 140 | "patch_size": [1, 2, 2], |
| 141 | "qk_norm": "rms_norm_across_heads", |
no outgoing calls
no test coverage detected
searching dependent graphs…