Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 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. #11507

Closed
1 task done
ku-count opened this issue Jun 29, 2023 · 19 comments
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance

Comments

@ku-count
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits

What happened?

I can't deploy the environment or(can not install SD successful )

Steps to reproduce the problem

press webui-user.bat it's the first time to click this button.

What should have happened?

The deployment was successful and a URL like 127.0.0.1:7860 from the web tutorial popped up!!

Version or Commit where the problem happens

V1-5-pruned-emaonly.ckpt

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (GTX 16 below)

Cross attention optimization

None

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

git pull
@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--medvram

call webui.bat

List of extensions

i dont know what

Console logs

win11 22621.1928  22H2  / python 3.10.6 / git 2.41.0 64bit

:::::::::::error code::::::
--------------------------------------------------------------------------------------------------------------------------------------
venv "D:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 98947d173e3f1667eba29c904f681047dea9de90
Installing requirements for Web UI
Launching Web UI with arguments: --medvram
Checkpoint model (7460a6fa).ckpt [7460a6fa] not found; loading fallback model.ckpt [7460a6fa]
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\launch.py", line 256, in <module>
    start()
  File "D:\stable-diffusion-webui\launch.py", line 251, in start
    webui.webui()
  File "D:\stable-diffusion-webui\webui.py", line 146, in webui
    initialize()
  File "D:\stable-diffusion-webui\webui.py", line 82, in initialize
    modules.sd_models.load_model()
  File "D:\stable-diffusion-webui\modules\sd_models.py", line 253, in load_model
    sd_model = instantiate_from_config(sd_config.model)
  File "D:\stable-diffusion-webui\repositories\stable-diffusion\ldm\util.py", line 85, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "D:\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 461, in __init__
    self.instantiate_cond_stage(cond_stage_config)
  File "D:\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 519, in instantiate_cond_stage
    model = instantiate_from_config(config)
  File "D:\stable-diffusion-webui\repositories\stable-diffusion\ldm\util.py", line 85, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()))
  File "D:\stable-diffusion-webui\repositories\stable-diffusion\ldm\modules\encoders\modules.py", line 141, in __init__
    self.tokenizer = CLIPTokenizer.from_pretrained(version)
  File "D:\stable-diffusion-webui\venv\lib\site-packages\transformers\tokenization_utils_base.py", line 1768, 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.

---------------------------------------------Dividing Line ------------------------------------------
Cloning Stable Diffusion into D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai...
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\launch.py", line 38, in <module>
    main()
  File "D:\stable-diffusion-webui\launch.py", line 29, in main
    prepare_environment()
  File "D:\stable-diffusion-webui\modules\launch_utils.py", line 299, in prepare_environment
    git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
  File "D:\stable-diffusion-webui\modules\launch_utils.py", line 153, in git_clone
    run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")
  File "D:\stable-diffusion-webui\modules\launch_utils.py", line 107, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't clone Stable Diffusion.
Command: "git" clone "https://github.com/Stability-AI/stablediffusion.git" "D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"
Error code: 128
stderr: Cloning into 'D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai'...
error: 2485 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
-------------------------------------------------------------------------------------------------------
the second time I run webui-user.bat and add the code: git pull  Error message for the second run

Additional information

No response

@ku-count ku-count added the bug-report Report of a bug, yet to be confirmed label Jun 29, 2023
@ku-count
Copy link
Author

the third time I run it by delete the code:git pull, only
@echo off

set PYTHON=
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS=--medvram

call webui.bat
---------------------------------------------------------------------diving line------------------------------------------------------------
venv "D:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.4.0
Commit hash: 394ffa7
Cloning Stable Diffusion into D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai...
Traceback (most recent call last):
File "D:\stable-diffusion-webui\launch.py", line 38, in
main()
File "D:\stable-diffusion-webui\launch.py", line 29, in main
prepare_environment()
File "D:\stable-diffusion-webui\modules\launch_utils.py", line 299, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "D:\stable-diffusion-webui\modules\launch_utils.py", line 153, in git_clone
run(f'"{git}" clone "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}")
File "D:\stable-diffusion-webui\modules\launch_utils.py", line 107, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't clone Stable Diffusion.
Command: "git" clone "https://github.com/Stability-AI/stablediffusion.git" "D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"
Error code: 128
stderr: Cloning into 'D:\stable-diffusion-webui\repositories\stable-diffusion-stability-ai'...
error: 3323 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

@LeonZhao28
Copy link
Contributor

LeonZhao28 commented Jun 29, 2023

download files from https://huggingface.co/openai/clip-vit-large-patch14/tree/main and put them into the directory stable-diffusion-webui/openai (create it if doesn't exist)

@ku-count
Copy link
Author

download files from https://huggingface.co/openai/clip-vit-large-patch14/tree/main and put them into the directory stable-diffusion-webui/openai (create it if doesn't exist)

3Q i ll try

@w-e-w w-e-w added asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance and removed bug-report Report of a bug, yet to be confirmed labels Jun 29, 2023
@starqiu
Copy link

starqiu commented Jul 22, 2023

download files from https://huggingface.co/openai/clip-vit-large-patch14/tree/main and put them into the directory stable-diffusion-webui/openai (create it if doesn't exist)

it works for me,3Q. don't put them on model directory~

@ku-count
Copy link
Author

ku-count commented Jul 27, 2023 via email

@JinghuaOriental
Copy link

download files from https://huggingface.co/openai/clip-vit-large-patch14/tree/main and put them into the directory stable-diffusion-webui/openai (create it if doesn't exist)

Thank you very much !!

@shihaiyang-world
Copy link

download all files from https://huggingface.co/openai/clip-vit-large-patch14/tree/main, all files!
and mkdir -p stable-diffusion-webui/openai/clip-vit-large-patch14
and move its to stable-diffusion-webui/openai/clip-vit-large-patch14/
like it:
image

@serg06
Copy link

serg06 commented Jan 19, 2024

I solved it like this:

cd stable-diffusion-webui
mkdir openai
cd openai
git clone https://huggingface.co/openai/clip-vit-large-patch14

P.S. can we update the repo with this permanent fix?

@JinghuaOriental
Copy link

JinghuaOriental commented Jan 19, 2024 via email

@becausecurious
Copy link

becausecurious commented Feb 10, 2024

if you started getting this error 1-2h ago when trying to run webui, it looks like https://huggingface.co/ is in maintenance, so that's why the download fails.

I don't see any estimate when it will be over, there is https://status.huggingface.co/ for the current status.

There is https://www.kaggle.com/datasets/ferruccioliu/openai-clip-vit-large-patch14 as an alternative for now.

@becausecurious
Copy link

huggingface is back, but the latency is huge - I suspect there is a large backlog of downloads.

@Jiatoka
Copy link

Jiatoka commented Mar 13, 2024

遇到这个问题都是中国人,直接用中文就好了。单纯就是被墙了,连不上huggingface,在windows上部署还好,起码能翻墙,linux才叫麻烦。

@jistan
Copy link

jistan commented May 28, 2024

不能翻墙的可以从百度网盘下载,链接: https://pan.baidu.com/s/1EBptJ2v9inq9A5LEYFfBMg 提取码: dh2b

@Xi-Meng
Copy link

Xi-Meng commented Jun 7, 2024

笑吐了,这个帖子

@Acommonlittlea
Copy link

所以到底放哪?有没有人能把完整路径放出来

@JinghuaOriental
Copy link

你运行webui.sh之后会生成一个stable-diffusion-webui文件夹,把openai这个文件夹放到stable-diffusion-webui文件夹下面就好了

所以到底放哪?有没有人能把完整路径放出来

@Acommonlittlea
Copy link

Windows怎么跑.sh?下WSL?

@JinghuaOriental
Copy link

Windows怎么跑.sh?下WSL?

windows下是跑bat文件吧,要用windows的安装方法,源文件也说了
image

@blue-cat-whale
Copy link

文件夹openai应该和webui.sh是同一个层级。 如果不想注册包括网盘在内的任何账号可以尝试 git clone https://www.modelscope.cn/AI-ModelScope/clip-vit-large-patch14.git获得模型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asking-for-help-with-local-system-issues This issue is asking for help related to local system; please offer assistance
Projects
None yet
Development

No branches or pull requests