Thanks for your code. But when running:
from inference_VQ_Diffusion import VQ_Diffusion
VQ_Diffusion_model = VQ_Diffusion(config='OUTPUT/pretrained_model/config_text.yaml', path='OUTPUT/pretrained_model/coco_learnable.pth')
an error occurred
FileNotFoundError: [Errno 2] No such file or directory: 'OUTPUT/pretrained_model/taming_dvae/taming_f8_8192_openimages_last.pth'
However, it seems that this file is not provided. I'll be grateful for any response.
The whole error traceback is copied below:
Traceback (most recent call last):
File "inference_VQ_Diffusion.py", line 152, in
path='OUTPUT/pretrained_model/cub_pretrained.pth')
File "inference_VQ_Diffusion.py", line 25, in init
self.info = self.get_model(ema=True, model_path=path, config_path=config, imagenet_cf=imagenet_cf)
File "inference_VQ_Diffusion.py", line 45, in get_model
model = build_model(config)
File "/root/VQ-Diffusion/image_synthesis/modeling/build.py", line 5, in build_model
return instantiate_from_config(config['model'])
File "/root/VQ-Diffusion/image_synthesis/utils/misc.py", line 132, in instantiate_from_config
return cls(**config.get("params", dict()))
File "/root/VQ-Diffusion/image_synthesis/modeling/models/dalle.py", line 35, in init
self.content_codec = instantiate_from_config(content_codec_config)
File "/root/VQ-Diffusion/image_synthesis/utils/misc.py", line 132, in instantiate_from_config
return cls(**config.get("params", dict()))
File "/root/VQ-Diffusion/image_synthesis/modeling/codecs/image_codec/taming_gumbel_vqvae.py", line 225, in init
model = self.LoadModel(config_path, ckpt_path)
File "/root/VQ-Diffusion/image_synthesis/modeling/codecs/image_codec/taming_gumbel_vqvae.py", line 248, in LoadModel
sd = torch.load(ckpt_path, map_location="cpu")["state_dict"]
File "/root/miniconda3/envs/vqdm/lib/python3.7/site-packages/torch/serialization.py", line 594, in load
with _open_file_like(f, 'rb') as opened_file:
File "/root/miniconda3/envs/vqdm/lib/python3.7/site-packages/torch/serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/root/miniconda3/envs/vqdm/lib/python3.7/site-packages/torch/serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'OUTPUT/pretrained_model/taming_dvae/taming_f8_8192_openimages_last.pth'