这几天本来开开心心的玩stable diffusion。突然又报错了。
倒是可以启动webui界面,但是读取不出所有的model和lora,所有功能按钮也失效了。看了iterm面版,
报错信息如下:
OSError: Can't load tokenizer for 'openai/clip-vit-large-patch14'. If you were trying to load it from '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.
找了很多资料,按照以下的方法最终解决了。
废话不多说,直接说解决方法
- 能上网的到hugging face去下载这个链接下的该目录的所有文件。(目录保留)https://huggingface.co/openai/clip-vit-large-patch14/tree/main
->不能上网的,到hugging face镜像站下载,同上。
https://plus.gitclone.com/models/openai/clip-vit-large-patch14
2.把下载好的整个文件夹扔到 stable-diffusion-webui
文件夹里。并记住这个存放的绝对路径 如:/Users/你的用户名/stable-diffusion-webui/clip-vit-large-patch14
3.打开 stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\encoders\modules.py 这个文件并查找中间包含的 “openai/clip-vit-large-patch14”的内容。
替换为你刚才存放的地址。
4.打开 stable-diffusion-webui\repositories\generative-models/sgm/modules/encoders/modules.py 这个文件并查找中间包含的 “openai/clip-vit-large-patch14”的内容。
替换为你刚才存放的地址。
问题解决,所有功能恢复正常