Closed yiyan32 closed 9 months ago
If waifu2x works, the iw3 model file may be corrupted due to download problems.
Try deleting iw3/pretrained_models/hub
folder and try again.
The first run will download a 1GB+ file, so it may take a long time.
Also, CLI will provide more detailed error messages.
python -m iw3.cli -i input.jpg -o output.png
I have downloaded all of the 3 depth models, still reporting an error. using the code you provided above for testing, the error details are as follows
thank you for your time
The error is iw3/pretrained_models/hub/checkpoints/ZoeD_M12_N.pt
file loading error.
Pytorch checkpoint file(model/weight/parameter file, .pt,.pth) is internally a zip archive, so the file format error seems to be such a message.
Possible causes are,
It's not likely to be 2 or 3, as waifu2x(loading other checkpoint files) is working. Possible causes of file corruption,
Could you check the size and MD5 of iw3\pretrained_models\hub\checkpoints\ZoeD_M12_N.pt
?
check file size (on command prompt)
dir iw3\pretrained_models\hub\checkpoints
result
Volume in drive C has no label.
Volume Serial Number is EA34-A50B
Directory of C:\dev\nunif\windows_package\nunif\iw3\pretrained_models\hub\checkpoints
09/27/2023 07:43 AM
2. check md5sum
certutil -hashfile iw3\pretrained_models\hub\checkpoints\ZoeD_M12_N.pt MD5
result
MD5 hash of iw3\pretrained_models\hub\checkpoints\ZoeD_M12_N.pt: f9b240db5a30a1600e25cad6866516b7 CertUtil: -hashfile command completed successfully.
File size: 1,443,406,099
MD5: f9b240db5a30a1600e25cad6866516b7
same result on linux.
```bash
% ls -la iw3/pretrained_models/hub/checkpoints/ZoeD_M12_N.pt
-rw------- 1 nagadomi nagadomi 1443406099 7月 28 13:02 iw3/pretrained_models/hub/checkpoints/ZoeD_M12_N.pt
% md5sum iw3/pretrained_models/hub/checkpoints/ZoeD_M12_N.pt
f9b240db5a30a1600e25cad6866516b7 iw3/pretrained_models/hub/checkpoints/ZoeD_M12_N.pt
Those ZoeDepth model files are downloaded from https://github.com/isl-org/ZoeDepth/releases/tag/v1.0
It is indeed an error caused by the damaged model. After manually downloading the corresponding model from Huggingface, it can run smoothly. Thank you for your patience and guidance!
Do you have any idea why the file is damaged?
It seems that torch.hub.load
stores the files first to the system's temporary folder.
Possibly there is not enough space there.
I will add file validation with the hash value.
Why is only the CPU recognized here and not my GPU? The CPU can be used, but it's too slow.
The above pic shows the model size and hash value that I downloaded automatically through the gui, while the system disk space is enough, it is very likely a network problem.
Thanks for the reply. It seems that there are repeated download failures, so automatic download retries may not fix the problem. However, I will try to clarify the error message.
image Strictly follow the steps to Manually install(https://github.com/nagadomi/nunif/blob/master/INSTALL-windows.md. The waifu2x is running well. However, when using iw3, whether it is converting pictures or videos, the same error will occur. The parameter settings are as shown above.