Open and-human opened 1 month ago
This typically happens when the InceptionV3 file did not get downloaded completely. Can you run this command to check if you get any error?
from cleanfid.fid import build_feature_extractor
feat_model = feature_extractor(name="torchscript_inception", resize_inside=False, device=device, use_dataparallel=Falsel)
-Gaurav
The above script required me to install a lot of dependencies. After installing them and changing feature_extractor to build_feature_extractor, I got unexpected keyword errors for resize_inside and use_dataparallel. After removing those and changing device to "cuda" I get following errors:
in python 3.12 - RuntimeError: PytorchStreamReader failed reading zip archive: not a ZIP archive in python 3.11 - TypeError: build_feature_extractor() got an unexpected keyword argument 'name'
I was trying to replicate pix2pix turbo training using the dataset given on the training page but end up getting this error again and again.
Device: ubuntu 22.04 server GPU: RTX A5000
Error:
Steps: 0%| | 0/10000 [00:00<?, ?it/s]Traceback (most recent call last): File "/home/anshuman/img2img-turbo/src/train_pix2pix_turbo.py", line 307, in
main(args)
File "/home/anshuman/img2img-turbo/src/train_pix2pix_turbo.py", line 154, in main
feat_model = build_feature_extractor("clean", "cuda", use_dataparallel=False)
File "/home/anshuman/img2img-turbo/venv/lib/python3.10/site-packages/cleanfid/features.py", line 46, in build_feature_extractor
feat_model = feature_extractor(name="torchscript_inception", resize_inside=False, device=device, use_dataparallel=use_dataparallel)
File "/home/anshuman/img2img-turbo/venv/lib/python3.10/site-packages/cleanfid/features.py", line 21, in feature_extractor
model = InceptionV3W(path, download=True, resize_inside=resize_inside).to(device)
File "/home/anshuman/img2img-turbo/venv/lib/python3.10/site-packages/cleanfid/inception_torchscript.py", line 35, in init
self.base = torch.jit.load(path).eval()
File "/home/anshuman/img2img-turbo/venv/lib/python3.10/site-packages/torch/jit/_serialization.py", line 162, in load
cpp_module = torch._C.import_ir_module(cu, str(f), map_location, _extra_files, _restore_shapes) # type: ignore[call-arg]
RuntimeError: PytorchStreamReader failed reading zip archive: not a ZIP archive