[O] Enable torch backward compatibility
This commit is contained in:
@@ -155,7 +155,7 @@ class CLAPWrapper():
|
|||||||
args.num_layers, args.normalize_prefix, args.mapping_type, True, True)
|
args.num_layers, args.normalize_prefix, args.mapping_type, True, True)
|
||||||
|
|
||||||
model_state_dict = torch.load(self.model_fp, map_location=torch.device('cpu'))['model']
|
model_state_dict = torch.load(self.model_fp, map_location=torch.device('cpu'))['model']
|
||||||
clapcap.load_state_dict(model_state_dict)
|
clapcap.load_state_dict(model_state_dict, strict=False)
|
||||||
|
|
||||||
clapcap.eval() # set clap in eval mode
|
clapcap.eval() # set clap in eval mode
|
||||||
tokenizer = AutoTokenizer.from_pretrained(args.text_model)
|
tokenizer = AutoTokenizer.from_pretrained(args.text_model)
|
||||||
|
|||||||
Reference in New Issue
Block a user