IDEA-CCNL/Taiyi-Diffusion-532M-Nature-Chinese does not appear to have a file named model_index.json.

#1
by samge - opened

拉取hugging face模型失败,提示:

Traceback (most recent call last):
  File "F:\Space\PRO115\python\PytorchTest\huggingface-transformers\太乙文生图.py", line 20, in <module>
    pipe = StableDiffusionPipeline.from_pretrained(model_path).to("cuda")
  File "F:\APP\Anaconda3\envs\pytorch\lib\site-packages\diffusers\pipeline_utils.py", line 459, in from_pretrained
    config_dict = cls.load_config(
  File "F:\APP\Anaconda3\envs\pytorch\lib\site-packages\diffusers\configuration_utils.py", line 354, in load_config
    raise EnvironmentError(
OSError: IDEA-CCNL/Taiyi-Diffusion-532M-Nature-Chinese does not appear to have a file named model_index.json.

测试代码:

from diffusers import StableDiffusionPipeline

model_path = "IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-v0.1"     # 中文    (正常使用)
model_path = "IDEA-CCNL/Taiyi-Stable-Diffusion-1B-Chinese-EN-v0.1"  # 中英双语 (正常使用)
model_path = "IDEA-CCNL/Taiyi-Diffusion-532M-Nature-Chinese"        # 自然风景-中文   (备注:拉取模型失败)
model_path = "IDEA-CCNL/Taiyi-Diffusion-532M-Cyberpunk-Chinese"     # 赛博朋克风-中文  (备注:拉取模型失败)
pipe = StableDiffusionPipeline.from_pretrained(model_path).to("cuda")

prompt = '飞流直下三千尺,油画'
image = pipe(prompt, guidance_scale=7.5).images[0]
image.save(f"imgs/{prompt}.png")

参考文档:
fengshenbang-doc.readthedocs.io

Sign up or log in to comment