adriaciurana / DragGAN

Unofficial implementation of the DragGAN paper
MIT License
88 stars 15 forks source link

upload image error #2

Open aipymhx opened 1 year ago

aipymhx commented 1 year ago

File "/data/conda/install/envs/ml/lib/python3.10/site-packages/gradio/routes.py", line 414, in run_predict output = await app.get_blocks().process_api( File "/data/conda/install/envs/ml/lib/python3.10/site-packages/gradio/blocks.py", line 1320, in process_api result = await self.call_function( File "/data/conda/install/envs/ml/lib/python3.10/site-packages/gradio/blocks.py", line 1048, in call_function prediction = await anyio.to_thread.run_sync( File "/data/conda/install/envs/ml/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/data/conda/install/envs/ml/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/data/conda/install/envs/ml/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/data/github/dd2/DragGAN/gradio_app.py", line 359, in on_change_model_pickle return init_wrapper_drag_gan(model_pickle_file.name, global_state, seed) File "/data/github/dd2/DragGAN/gradio_app.py", line 23, in init_wrapper_drag_gan drag_gan, w_latent, image_raw = init_drag_gan(ref, device, int(seed)) File "/data/github/dd2/DragGAN/gradio_app.py", line 15, in init_drag_gan drag_gan = DragGAN(network_pkl, device=device) File "/data/github/dd2/DragGAN/drag_gan.py", line 107, in init self._G = legacy.load_network_pkl(f)["G_ema"].to(device) # type: ignore File "/data/github/dd2/DragGAN/stylegan2-ada-pytorch/legacy.py", line 21, in load_network_pkl data = _LegacyUnpickler(f).load() _pickle.UnpicklingError: invalid load key, '\xff'.

adriaciurana commented 1 year ago

Could you provide more information, I have manually downloaded some official weights of nvidia styleganv2-ada and it works correctly for me.

Are you using some custom weights? Thanks