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

Commit 9176eb5

Browse files
committed
leave CLIP conversion for later
1 parent 9c832aa commit 9176eb5

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

utils/convert_diffusers_to_original_ms_text_to_video.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def convert_unet_state_dict(unet_state_dict):
244244

245245

246246
def convert_text_enc_state_dict_v20(text_enc_dict):
247-
print ('Converting the text encoder')
247+
#print ('Converting the text encoder')
248248
new_state_dict = {}
249249
capture_qkv_weight = {}
250250
capture_qkv_bias = {}
@@ -444,17 +444,18 @@ def convert_text_enc_state_dict(text_enc_dict):
444444
else:
445445
#state_dict = {"state_dict": state_dict}
446446
torch.save(state_dict, args.checkpoint_path)
447-
448-
print ('Saving CLIP')
449-
state_dict = {**text_enc_dict}
450447

451-
if args.half:
452-
state_dict = {k: v.half() for k, v in state_dict.items()}
448+
# TODO: CLIP conversion doesn't work atm
449+
# print ('Saving CLIP')
450+
# state_dict = {**text_enc_dict}
453451

454-
if args.use_safetensors:
455-
save_file(state_dict, args.checkpoint_path)
456-
else:
457-
#state_dict = {"state_dict": state_dict}
458-
torch.save(state_dict, args.clip_checkpoint_path)
452+
# if args.half:
453+
# state_dict = {k: v.half() for k, v in state_dict.items()}
454+
455+
# if args.use_safetensors:
456+
# save_file(state_dict, args.checkpoint_path)
457+
# else:
458+
# #state_dict = {"state_dict": state_dict}
459+
# torch.save(state_dict, args.clip_checkpoint_path)
459460

460461
print('Operation successfull')

0 commit comments

Comments
 (0)