|
24 | 24 | ("time_embed.2.weight", "time_embedding.linear_2.weight"), |
25 | 25 | ("time_embed.2.bias", "time_embedding.linear_2.bias"), |
26 | 26 |
|
27 | | - # # from Modelscope only |
28 | | - # ("label_emb.0.0.weight", "class_embedding.linear_1.weight"), |
29 | | - # ("label_emb.0.0.bias", "class_embedding.linear_1.bias"), |
30 | | - # ("label_emb.0.2.weight", "class_embedding.linear_2.weight"), |
31 | | - # ("label_emb.0.2.bias", "class_embedding.linear_2.bias"), |
32 | 27 |
|
33 | 28 | # from Vanilla ModelScope/StableDiffusion |
34 | 29 | ("input_blocks.0.0.weight", "conv_in.weight"), |
35 | 30 | ("input_blocks.0.0.bias", "conv_in.bias"), |
36 | 31 |
|
37 | | - # from Modelscope only |
38 | | - #("input_blocks.0.1", "transformer_in.weight"), |
39 | | - #("input_blocks.0.1.bias", "transformer_in.bias"), |
40 | 32 |
|
41 | 33 | # from Vanilla ModelScope/StableDiffusion |
42 | 34 | ("out.0.weight", "conv_norm_out.weight"), |
|
88 | 80 |
|
89 | 81 | # hardcoded number of downblocks and resnets/attentions... |
90 | 82 | # would need smarter logic for other networks. |
91 | | -for i in range(4):# 4 UD/DOWN BLOCKS CONFIRMED --kabachuha |
| 83 | +for i in range(4): |
92 | 84 | # loop over downblocks/upblocks |
93 | 85 |
|
94 | | - for j in range(2): # 2 RESNET BLOCKS CONFIRMED --kabachuha |
| 86 | + for j in range(2): |
95 | 87 | # loop over resnets/attentions for downblocks |
96 | 88 |
|
97 | 89 | # Spacial SD stuff |
@@ -184,8 +176,6 @@ def convert_unet_state_dict(unet_state_dict): |
184 | 176 | # the exact order in which I have arranged them. |
185 | 177 | mapping = {k: k for k in unet_state_dict.keys()} |
186 | 178 |
|
187 | | - |
188 | | - |
189 | 179 | for sd_name, hf_name in unet_conversion_map: |
190 | 180 | mapping[hf_name] = sd_name |
191 | 181 | for k, v in mapping.items(): |
|
0 commit comments