马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
1. 报错形貌
本地部署好 Stable diffusion 以后,点击加载模型时报 openai/clip-vit-large-patch14 错误,具体报错信息如下:
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
2. 报错原因
连不上huggingface,无法下载模型。
3. 办理方法
1)手动下载 clip-vit-large-patch14 相干文件,可以直接在网盘下载,也可以去官网下载。网盘下载地点为:https://pan.quark.cn/s/220913e4ac3a
2)在本地磁盘中创建 openai 目录;
3)将下载的文件解压缩放入 openai 目录中;
4)打开本地安装目录中的 tokenization_utils_base.py 文件,文件路径为:\stable-diffusion-webui\venv\Lib\site-packages\transformers
5)在文件中搜刮 pretrained_model_name_or_path =,修改等号背面的路径为第 3 步中 clip-vit-large-patch14 的路径。比方:
6)打开 \stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\encoders 路径下的 modules.py 文件,修改路径,具体如下(有两处):
第 1 处:
第 2 处:
7. 重启 SD ,重启后再次加载模型,已经可以加载出来了:
#Stable diffusion
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |