web建站教程

  1. 首页
  2. vuejs
  3. js
  4. 好玩
  5. seo教程
  6. 前端知识
  7. 百度echarts
  8. php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站

Mac系统运行stable diffusion项目报“clip-vit-large-patch14”错误解决方法!

1073 ℃
     

问题描述:下载stable-diffusion-webui项目运行./webui.sh的时候一直提示以下错误代码:

creating model quickly: OSError
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/Volumes/AI/SD/stable-diffusion-webui/modules/initialize.py", line 147, in load_model
    shared.sd_model  # noqa: B018
  File "/Volumes/AI/SD/stable-diffusion-webui/modules/shared_items.py", line 128, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "/Volumes/AI/SD/stable-diffusion-webui/modules/sd_models.py", line 531, in get_sd_model
    load_model()
  File "/Volumes/AI/SD/stable-diffusion-webui/modules/sd_models.py", line 634, in load_model
    sd_model = instantiate_from_config(sd_config.model)
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 563, in __init__
    self.instantiate_cond_stage(cond_stage_config)
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 630, in instantiate_cond_stage
    model = instantiate_from_config(config)
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/encoders/modules.py", line 103, in __init__
    self.tokenizer = CLIPTokenizer.from_pretrained(version)
  File "/Volumes/AI/SD/stable-diffusion-webui/venv/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1809, in from_pretrained
    raise EnvironmentError(
OSError: Can't load tokenizer for 'openai/clip-vit-large-patch14'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'openai/clip-vit-large-patch14' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

Failed to create model quickly; will retry using slow method.
loading stable diffusion model: OSError
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 973, in _bootstrap
    self._bootstrap_inner()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/Volumes/AI/SD/stable-diffusion-webui/modules/initialize.py", line 147, in load_model
    shared.sd_model  # noqa: B018
  File "/Volumes/AI/SD/stable-diffusion-webui/modules/shared_items.py", line 128, in sd_model
    return modules.sd_models.model_data.get_sd_model()
  File "/Volumes/AI/SD/stable-diffusion-webui/modules/sd_models.py", line 531, in get_sd_model
    load_model()
  File "/Volumes/AI/SD/stable-diffusion-webui/modules/sd_models.py", line 643, in load_model
    sd_model = instantiate_from_config(sd_config.model)
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 563, in __init__
    self.instantiate_cond_stage(cond_stage_config)
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 630, in instantiate_cond_stage
    model = instantiate_from_config(config)
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py", line 89, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "/Volumes/AI/SD/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/encoders/modules.py", line 103, in __init__
    self.tokenizer = CLIPTokenizer.from_pretrained(version)
  File "/Volumes/AI/SD/stable-diffusion-webui/venv/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1809, in from_pretrained
    raise EnvironmentError(
OSError: Can't load tokenizer for 'openai/clip-vit-large-patch14'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'openai/clip-vit-large-patch14' is the correct path to a directory containing all relevant files for a CLIPTokenizer tokenizer.

应该是外围的原因,一直加载失败,下面是小编从网上搜到的解决方法!

解决方案

1、找到stable-diffusion-webui目录右键终端,输入以下代码:

mkdir openai //创建openai文件夹

2、找到openai目录右键终端,输入以下代码:

git clone https://www.modelscope.cn/AI-ModelScope/clip-vit-large-patch14.git

如果输出以下代码就说明安装成功了

Cloning into 'clip-vit-large-patch14'...
remote: Enumerating objects: 22, done.
remote: Counting objects: 100% (22/22), done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 22 (delta 1), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (22/22), 1.08 MiB | 5.23 MiB/s, done.
Resolving deltas: 100% (1/1), done.

需要注意的是,小编有些文件已经手动下载好了,所有只有5M,如果你什么也没有下载大约有 12.7GB 左右!这个时候你打开已经运行的http://127.0.0.1:7861/页面会发现原先无法加载的Stable Diffusion checkpoint已经有默认值了!

如果code>Stable Diffusion checkpoint还是空的,看一下下拉框里有没有数据,电脑文件夹位置stable-diffusion-webui -> models -> Stable-diffusion,结束了!

Windows电脑如何安装stable-diffusion项目进行AI绘画(附电脑配置需求说明)

Mac电脑如何安装stable-diffusion项目进行AI绘画(SD安装)

一个面向AI创作者的免费在线生成图像的模型分享社区——吐司TusiArt

苹果Mac电脑怎么降低系统版本吗?具体操作流程

Mac电脑怎么装低版本系统?

标签: AI绘画, Mac系统, stable-diffusion-webui

上面是“Mac系统运行stable diffusion项目报“clip-vit-large-patch14”错误解决方法!”的全面内容,想了解更多关于 IT知识 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_16047.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > IT知识
本文共计5561个字,预计阅读时长38分钟
生活小工具,收录了80多款小工具
上一篇: 推荐一款简单高效漂亮的多平台笔记应用——Zoho Notebook
下一篇: 推荐2款充满科技感的艺术字体——小新黑体、小新潮酷体
x 打工人ai神器