-
Notifications
You must be signed in to change notification settings - Fork 451
Description
hi, i'm try to run the notebook, but i meet some problems.
it look's like the download model file is not correct, because it's too small:

and then when i run the code of "torch.load", it unsurprisingly threw an error:
UnpicklingError Traceback (most recent call last)
in <cell line: 8>()
6 vtoonify = VToonify(backbone = 'dualstylegan')
7 #vtoonify.load_state_dict(torch.load(os.path.join(MODEL_DIR, style_type+'_generator.pt'), map_location=lambda storage, loc: storage)['g_ema'])
----> 8 vtoonify.load_state_dict(torch.load(os.path.join(MODEL_DIR, 'cartoon026_generator.pt'), map_location=lambda storage, loc: storage)['g_ema'])
9 vtoonify.to(device)
10
1 frames
/usr/local/lib/python3.10/dist-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
1626 )
1627
-> 1628 magic_number = pickle_module.load(f, **pickle_load_args)
1629 if magic_number != MAGIC_NUMBER:
1630 raise RuntimeError("Invalid magic number; corrupt file?")
UnpicklingError: invalid load key, '<'.
How could i fix this error? could you help me please.