ai-forever / Kandinsky-2

Kandinsky 2 — multilingual text2image latent diffusion model
Apache License 2.0
2.75k stars 307 forks source link

cant`get file #56

Closed mmmmmomo closed 1 year ago

mmmmmomo commented 1 year ago

when i run model = get_kandinsky2('cuda', task_type='text2img', model_version='2.1', use_flash_attention=False)

,it raise error

 Traceback (most recent call last):
   File "sketch2img.py", line 24, in <module>
        model = get_kandinsky2('cuda', task_type='text2img', model_version='2.1', use_flash_attention=False)
   File "/root/jobs/Kandinsky-2/kandinsky2/__init__.py", line 179, in get_kandinsky2
        model = get_kandinsky2_1(
   File "/root/jobs/Kandinsky-2/kandinsky2/__init__.py", line 159, in get_kandinsky2_1
        model = Kandinsky2_1(config, cache_model_name, cache_prior_name, device, task_type=task_type)
   File "/root/jobs/Kandinsky-2/kandinsky2/kandinsky2_1_model.py", line 60, in __init__
        self.text_encoder = TextEncoder(**self.config["text_enc_params"])
   File "/root/jobs/Kandinsky-2/kandinsky2/model/text_encoders.py", line 144, in __init__
        torch.load(os.path.join(model_path, "pytorch_model.bin")), strict=False
   File "/root/miniconda3/envs/test/lib/python3.8/site-packages/torch/serialization.py", line 797, in load
        with _open_zipfile_reader(opened_file) as opened_zipfile:
   File "/root/miniconda3/envs/test/lib/python3.8/site-packages/torch/serialization.py", line 283, in __init__
       super().__init__(torch._C.PyTorchFileReader(name_or_buffer))
 RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

it seems like the file can not be found,what can i do to resolve it

mmmmmomo commented 1 year ago

i got it,it made error when i download files