gpt4 book ai didi

python - 迪斯科扩散 : PytorchStreamReader failed reading zip archive: failed finding central directory

转载 作者:行者123 更新时间:2023-12-02 18:17:55 32 4
gpt4 key购买 nike

我尝试使用基本默认设置运行 Disco Diffusion v5,但在尝试创建图像时出现此错误。有谁知道如何解决这个问题?

Starting Run: Horse 02(0) at frame 0

Prepping model...

RuntimeError Traceback (most recent call last)
<ipython-input-20-da8a92ac51ae> in <module>()
148 print('Prepping model...')
149 model, diffusion = create_model_and_diffusion(**model_config)
--> 150 model.load_state_dict(torch.load(f'{model_path}/{diffusion_model}.pt', map_location='cpu'))
151 model.requires_grad_(False).eval().to(device)
152 for name, param in model.named_parameters():

1 frames
/usr/local/lib/python3.7/dist-packages/torch/serialization.py in __init__(self, name_or_buffer)
240 class _open_zipfile_reader(_opener):
241 def __init__(self, name_or_buffer) -> None:
--> 242 super(_open_zipfile_reader, self).__init__(torch._C.PyTorchFileReader(name_or_buffer))
243
244

RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory

最佳答案

我解决这个问题的方法是删除 google Drive 中的文件夹“AI”,然后重新运行它。我猜问题可能是由于第一次运行时未正确下载不完整的预训练模型,导致无法下载正确版本的模型。

关于python - 迪斯科扩散 : PytorchStreamReader failed reading zip archive: failed finding central directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71298010/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com