bcmi / DCI-VTON-Virtual-Try-On

[ACM Multimedia 2023] Taming the Power of Diffusion Models for High-Quality Virtual Try-On with Appearance Flow.
https://arxiv.org/abs/2308.06101
MIT License
387 stars 56 forks source link

Failure to load warp_viton.pth checkpoints #20

Closed IceCocoecI closed 10 months ago

IceCocoecI commented 11 months ago

I have already installed the dependencies following the instructions in projects DCI-VTON-Virtual-Try-On and PF-AFN. My system environment is wsl2 ubuntu 22.04. But in Warping Module,when I run the command "test_VITON.sh",some errors occurred.

------------ Options ------------- batchSize: 32 data_type: 32 dataroot: ./dataset/VITON-HD display_winsize: 512 fineSize: 512 gen_checkpoint: checkpoints/PFAFN/gen_model_final.pth gpu_ids: [0] input_nc: 3 isTrain: False label_nc: 13 loadSize: 512 max_dataset_size: inf nThreads: 1 name: cloth-warp no_flip: False norm: instance output_nc: 3 phase: test resize_or_crop: none serial_batches: False tf_log: False unpaired: True use_dropout: False verbose: False warp_checkpoint: checkpoints/warp_viton.pth -------------- End ----------------

training images = 64

Traceback (most recent call last): File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 189, in nti n = int(s.strip() or "0", 8) ValueError: invalid literal for int() with base 8: 'torch._u'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 2299, in next tarinfo = self.tarinfo.fromtarfile(self) File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 1093, in fromtarfile obj = cls.frombuf(buf, tarfile.encoding, tarfile.errors) File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 1035, in frombuf chksum = nti(buf[148:156]) File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 191, in nti raise InvalidHeaderError("invalid header") tarfile.InvalidHeaderError: invalid header

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/site-packages/torch/serialization.py", line 556, in _load return legacy_load(f) File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/site-packages/torch/serialization.py", line 467, in legacy_load with closing(tarfile.open(fileobj=f, mode='r:', format=tarfile.PAX_FORMAT)) as tar, \ File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 1591, in open return func(name, filemode, fileobj, kwargs) File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 1621, in taropen return cls(name, mode, fileobj, kwargs) File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 1484, in init self.firstmember = self.next() File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/tarfile.py", line 2311, in next raise ReadError(str(e)) tarfile.ReadError: invalid header

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "eval_PBAFN_viton.py", line 37, in load_checkpoint(warp_model, opt.warp_checkpoint) File "/home/wyfx/projects/PF-AFN/PF-AFN_test/models/networks.py", line 178, in load_checkpoint checkpoint = torch.load(checkpoint_path) File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/site-packages/torch/serialization.py", line 387, in load return _load(f, map_location, pickle_module, **pickle_load_args) File "/home/wyfx/anaconda3/envs/tryon/lib/python3.6/site-packages/torch/serialization.py", line 560, in _load raise RuntimeError("{} is a zip archive (did you mean to use torch.jit.load()?)".format(f.name)) RuntimeError: checkpoints/warp_viton.pth is a zip archive (did you mean to use torch.jit.load()?)

The problem is similar to the following issue, https://github.com/bcmi/DCI-VTON-Virtual-Try-On/issues/11 . I try "pip install cupy-cuda11x",but can not install,the error is as follows

ERROR: Cannot unpack file /tmp/pip-unpack-suqln0bl/simple.htm (downloaded from /tmp/pip-req-build-_upoi04a, content-type: text/html); cannot detect archive format ERROR: Cannot determine archive format of /tmp/pip-req-build-_upoi04a

Limbor commented 11 months ago

You can refer to this website to install the appropriate package according to the cuda version of your system.