fix CLIP conversion script (#13474)

This commit is contained in:
Suraj Patil 2021-09-08 12:57:18 +05:30 committed by GitHub
parent 4be082ce39
commit f5d3bb1dd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,7 +117,7 @@ def convert_clip_checkpoint(checkpoint_path, pytorch_dump_folder_path, config_pa
hf_model = CLIPModel(config).eval()
pt_model, _ = load(checkpoint_path, jit=False)
pt_model, _ = load(checkpoint_path, device="cpu", jit=False)
pt_model = pt_model.eval()
copy_text_model_and_projection(hf_model, pt_model)