cnulab/RealNet

您好,根据您对于生成私有数据集异常样本的相关回复,在进行到运行sample.py时发生了关于权重导入的错误。

Closed this issue · 2 comments

image
Traceback (most recent call last):
File "/opt/chenrs/RealNet-main/sample.py", line 144, in
main()
File "/opt/chenrs/RealNet-main/sample.py", line 68, in main
model = create_diffusion_unet(**config.unet).cuda()
File "/opt/chenrs/RealNet-main/models/sdas/create_models.py", line 41, in create_diffusion_unet
missing_keys, unexpected_keys = load_pertrain_weights(pertrain_path,unet)
File "/opt/chenrs/RealNet-main/utils/misc_helper.py", line 18, in load_pertrain_weights
pertrain_state_dict = torch.load(pertrain_path, map_location=torch.device(map_location))
File "/home/jiasj/miniconda3/envs/zth2/lib/python3.8/site-packages/torch/serialization.py", line 705, in load
with _open_zipfile_reader(opened_file) as opened_zipfile:
File "/home/jiasj/miniconda3/envs/zth2/lib/python3.8/site-packages/torch/serialization.py", line 243, in init
super(_open_zipfile_reader, self).init(torch._C.PyTorchFileReader(name_or_buffer))
RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

请指正如何解决,期待您的回复!

你好!
你需要检查一下你的模型文件有没有损坏,应该是权重文件的问题。

已解决问题,感谢您的回复