compliance with old pytoch

main
lipku 7 months ago
parent 00e3c8a23d
commit 4abe54f33e

@ -48,7 +48,7 @@ print('Using {} for inference.'.format(device))
def _load(checkpoint_path):
if device == 'cuda':
checkpoint = torch.load(checkpoint_path,weights_only=True)
checkpoint = torch.load(checkpoint_path) #,weights_only=True
else:
checkpoint = torch.load(checkpoint_path,
map_location=lambda storage, loc: storage)

@ -76,7 +76,7 @@ def load_avatar(avatar_id):
# "bbox_shift":self.bbox_shift
# }
input_latent_list_cycle = torch.load(latents_out_path,weights_only=True)
input_latent_list_cycle = torch.load(latents_out_path) #,weights_only=True
with open(coords_path, 'rb') as f:
coord_list_cycle = pickle.load(f)
input_img_list = glob.glob(os.path.join(full_imgs_path, '*.[jpJP][pnPN]*[gG]'))

Loading…
Cancel
Save