czczup / URST

[AAAI 2022] Towards Ultra-Resolution Neural Style Transfer via Thumbnail Instance Normalization

Home Page:https://arxiv.org/abs/2103.11784

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_pickle.UnpicklingError: invalid load key, '\xff'.

nickyvdz-art opened this issue · comments

no problems, fixed. - thank you so very much for this, this is truly excellent, what a package!

(Wang) C:\Users\Bob\URST\Johnson2016Perceptual>python test.py --content C:\Users\Bob\Desktop\ds.jpg --model C:\Users\Bob\Desktop\dsstyle.jpg --URST
Namespace(URST=True, content='C:\Users\Bob\Desktop\ds.jpg', device='cuda', model='C:\Users\Bob\Desktop\dsstyle.jpg', outf='output', padding=32, patch_size=1000, test_speed=False, thumb_size=1024)
Traceback (most recent call last):
File "test.py", line 76, in
checkpoint = torch.load(args.model)
File "C:\Users\Bob\anaconda3\envs\Wang\lib\site-packages\torch\serialization.py", line 387, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "C:\Users\Bob\anaconda3\envs\Wang\lib\site-packages\torch\serialization.py", line 564, in _load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\xff'.

this im having trouble working out though?

(Wang) C:\Users\Bob\URST\Johnson2016Perceptual>python test.py --content C:\Users\Bob\Desktop\ds.jpg --model C:\Users\Bob\Desktop\dsstyle.jpg --URST
Namespace(URST=True, content='C:\Users\Bob\Desktop\ds.jpg', device='cuda', model='C:\Users\Bob\Desktop\dsstyle.jpg', outf='output', padding=32, patch_size=1000, test_speed=False, thumb_size=1024)
Traceback (most recent call last):
File "test.py", line 76, in
checkpoint = torch.load(args.model)
File "C:\Users\Bob\anaconda3\envs\Wang\lib\site-packages\torch\serialization.py", line 387, in load
return _load(f, map_location, pickle_module, **pickle_load_args)
File "C:\Users\Bob\anaconda3\envs\Wang\lib\site-packages\torch\serialization.py", line 564, in _load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '\xff'.

this im having trouble working out though?

Hi, Johnson2016Perceptual is a style-specific style transfer method, that is, it requires training a model for each style. So this method has no --style option. The --model option requires a .pth model instead of an image.