Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 3d162ac

Browse files
committed
cleanup comments
1 parent e8149f5 commit 3d162ac

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

utils/convert_diffusers_to_original_ms_text_to_video.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,11 @@
2424
("time_embed.2.weight", "time_embedding.linear_2.weight"),
2525
("time_embed.2.bias", "time_embedding.linear_2.bias"),
2626

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"),
3227

3328
# from Vanilla ModelScope/StableDiffusion
3429
("input_blocks.0.0.weight", "conv_in.weight"),
3530
("input_blocks.0.0.bias", "conv_in.bias"),
3631

37-
# from Modelscope only
38-
#("input_blocks.0.1", "transformer_in.weight"),
39-
#("input_blocks.0.1.bias", "transformer_in.bias"),
4032

4133
# from Vanilla ModelScope/StableDiffusion
4234
("out.0.weight", "conv_norm_out.weight"),
@@ -88,10 +80,10 @@
8880

8981
# hardcoded number of downblocks and resnets/attentions...
9082
# 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):
9284
# loop over downblocks/upblocks
9385

94-
for j in range(2): # 2 RESNET BLOCKS CONFIRMED --kabachuha
86+
for j in range(2):
9587
# loop over resnets/attentions for downblocks
9688

9789
# Spacial SD stuff
@@ -184,8 +176,6 @@ def convert_unet_state_dict(unet_state_dict):
184176
# the exact order in which I have arranged them.
185177
mapping = {k: k for k in unet_state_dict.keys()}
186178

187-
188-
189179
for sd_name, hf_name in unet_conversion_map:
190180
mapping[hf_name] = sd_name
191181
for k, v in mapping.items():

0 commit comments

Comments
 (0)