Skip to content

[Bug]: Couldn't Install Clip #17201

Description

@ZurokSlayer7X9

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

I used the NVidia Automatic for Windows method with the sd.webui.zip.
When attempting to set up using the "run.bat" file, it eventually gets to the point where it attempts to install "clip". After that it will give me a "Press and key to continue..." which will close the Command Window and nothing else will happen.

I've seen others bring this issue up before, however their error codes are different than mine. I'm not very well versed in python to know exactly what is going on here. I've seen some solutions mention running a script in the "venv" folder, but I don't even have that, just a "tmp" folder.

I have done two clean installs, as well installing in fresh locations, however the same issue arises. I also ran the "update.bat" before running "run.bat".

Steps to reproduce the problem

  1. Double click "run.bat"
  2. Get error saying it cannot install clip.

What should have happened?

Install clip and open the WebUI I guess.

What browsers do you use to access the UI ?

Brave

Sysinfo

I cannot even get to the WebUI.

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.10.1
Commit hash:
Installing clip
Traceback (most recent call last):
File "M:\AI\Stable Diffusion\sd.webui\webui\launch.py", line 48, in
main()
File "M:\AI\Stable Diffusion\sd.webui\webui\launch.py", line 39, in main
prepare_environment()
File "M:\AI\Stable Diffusion\sd.webui\webui\modules\launch_utils.py", line 394, in prepare_environment
run_pip(f"install {clip_package}", "clip")
File "M:\AI\Stable Diffusion\sd.webui\webui\modules\launch_utils.py", line 144, in run_pip
return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
File "M:\AI\Stable Diffusion\sd.webui\webui\modules\launch_utils.py", line 116, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install clip.
Command: "M:\AI\Stable Diffusion\sd.webui\system\python\python.exe" -m pip install https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip --prefer-binary
Error code: 2
stdout: Collecting https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip
Using cached https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip (4.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'

stderr: ERROR: Exception:
Traceback (most recent call last):
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\cli\base_command.py", line 107, in _run_wrapper
status = _inner_run()
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\cli\base_command.py", line 98, in _inner_run
return self.run(options, args)
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\cli\req_command.py", line 85, in wrapper
return func(self, options, args)
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\commands\install.py", line 388, in run
requirement_set = resolver.resolve(
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 79, in resolve
collected = self.factory.collect_root_requirements(root_reqs)
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 538, in collect_root_requirements
reqs = list(
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 494, in _make_requirements_from_install_req
cand = self._make_base_candidate_from_link(
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 226, in _make_base_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 318, in init
super().init(
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 161, in init
self.dist = self._prepare()
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 238, in _prepare
dist = self._prepare_distribution()
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 329, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 543, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 658, in _prepare_linked_requirement
dist = _get_prepared_distribution(
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\operations\prepare.py", line 77, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 55, in prepare_distribution_metadata
self._install_build_reqs(build_env_installer)
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 132, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\distributions\sdist.py", line 107, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_internal\utils\misc.py", line 694, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 196, in get_requires_for_build_wheel
return self._call_hook(
File "M:\AI\Stable Diffusion\sd.webui\system\python\lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 402, in _call_hook
raise BackendUnavailable(
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Cannot import 'setuptools.build_meta'

Additional information

I have a newer version of Python, but am using pyenv-win to downgrade from 3.12.4 to 3.10.6. Both the Command Prompt from run.bat as well as PowerShell recognize 3.10.6 as the version.

Using an RTX 3090 if that makes any difference.

Activity

jarvonH commented on Dec 15, 2025

@jarvonH

安装 OpenAI CLIP: D:\proj\sd.webui\system\python\python.exe -m pip install --no-build-isolation "git+ https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1#egg=clip"

安装 OpenCLIP: D:\proj\sd.webui\system\python\python.exe -m pip install --no-build-isolation https://github.com/mlfoundations/open_clip/archive/bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b.zip

tysoncung commented on Dec 30, 2025

@tysoncung

Looking at this issue, the problem is almost certainly network-related or a Python environment issue rather than a clip-specific bug. The fact that you don't have a venv folder yet suggests the installation is failing very early, before the virtual environment is even fully created. Can you try running run.bat from an administrator command prompt and paste the full console output here? The "Press any key to continue" message appears when there's a fatal error, but we need to see what comes before it. Also check if you have Python 3.10.x installed system-wide and that it's in your PATH - the webui requires a specific Python version range and will fail silently if it can't find a compatible interpreter.

muhsandi commented on Jan 1, 2026

@muhsandi

i have the same issue and when i run run.bat from an administrator command prompt this is appears

INCOMPATIBLE PYTHON VERSION

This program is tested with 3.10.6 Python, but you have 3.14.2.
If you encounter an error with "RuntimeError: Couldn't install torch." message,
or any other error regarding unsuccessful package (library) installation,
please downgrade (or upgrade) to the latest version of 3.10 Python
and delete current Python and "venv" folder in WebUI's directory.

You can download 3.10 Python from here: https://www.python.org/downloads/release/python-3106/

Alternatively, use a binary release of WebUI: https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.0.0-pre

Use --skip-python-version-check to suppress this warning.

Python 3.14.2 (tags/v3.14.2:df79316, Dec 5 2025, 17:18:21) [MSC v.1944 64 bit (AMD64)]
Version: 1.10.1
Commit hash:
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu128
ERROR: Could not find a version that satisfies the requirement torch==2.7.0 (from versions: 2.9.0, 2.9.0+cu128, 2.9.1, 2.9.1+cu128)
ERROR: No matching distribution found for torch==2.7.0
Traceback (most recent call last):
File "C:\Users\PERSONAL\OneDrive\Desktop\A1111\webui\launch.py", line 53, in
main()
~~~~^^
File "C:\Users\PERSONAL\OneDrive\Desktop\A1111\webui\launch.py", line 44, in main
prepare_environment()
~~~~~~~~~~~~~~~~~~~^^
File "C:\Users\PERSONAL\OneDrive\Desktop\A1111\webui\modules\launch_utils.py", line 413, in prepare_environment
run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PERSONAL\OneDrive\Desktop\A1111\webui\modules\launch_utils.py", line 114, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "C:\Users\PERSONAL\OneDrive\Desktop\A1111\webui\venv\Scripts\python.exe" -m pip install torch==2.7.0 torchvision==0.22.0 --extra-index-url https://download.pytorch.org/whl/cu128
Error code: 1

OmegaVenus32 commented on Jan 8, 2026

@OmegaVenus32

It absolutely is a wrong version of Python issue. Just had to fix my own. I had to track it down in appdata local and just delete the old files then manually install just the 3.10.6 once I got it and installed + added to path it's working fine.

WhizZest commented on Feb 11, 2026

@WhizZest
  1. Clone the Repository

Note: The main branch was last updated two years ago (2024), while the dev branch was last updated on December 18, 2025. According to feedback from issues #17213 and #17235, the dev branch works correctly, so we'll use it.

Option 1: Clone then switch to dev branch

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
git switch dev
git pull

Option 2: Directly clone dev branch

git clone -b dev https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
  1. Python Environment (Choose One Option)

Option A: Use Conda (Recommended for environment isolation)

conda create -n sd_webui python=3.10.6 -y
conda activate sd_webui

Option B: Directly install Python 3.10.6

  1. Run the Installation Script

This process will create a venv virtual environment.

Windows:

.\webui-user.bat

Linux/Mac:

./webui.sh
  1. Fix CLIP Installation Failure (If Encountered)

If you encounter CLIP installation errors like:

First repair the build tools in the venv environment, then install CLIP:

Windows:

.\venv\Scripts\python.exe -m pip install wheel
.\venv\Scripts\Python.exe -m pip install "setuptools<70"
.\venv\Scripts\python.exe -m pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1

Linux/Mac:

source venv/bin/activate
pip install wheel
pip install "setuptools<70"
pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1
deactivate
  1. Continue Running the Installation Script

After fixing CLIP, run the installation script again:
Windows:

.\webui-user.bat

Linux/Mac:

./webui.sh

PS: Linux/Mac steps have not been tested personally.

user414 commented on Feb 11, 2026

@user414

@WhizZest Thanks for the workaround, saved a good amount of time. I can confirm it works on linux.

On a side note no idea what the long term fix will be, whether CLIP will change to work with newer setup tools or if this will change but in the mean time if someone who can modify the main page could add a sentence about this it would be good.

alekseyHunter commented on Feb 15, 2026

@alekseyHunter
  1. Клонируйте репозиторий

Примечание: основное ветку последний раз обновляли два года назад (2024), а ветку разработки — 18 декабря 2025 года. Согласно отзывам из задач #17213 и #17235 , ветка разработки работает корректно, поэтому мы будем её использовать.

Вариант 1: Клонировать репозиторий, затем переключиться на ветку разработки.

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
git switch dev
git pull

Вариант 2: Непосредственно клонировать ветку разработки.

git clone -b dev https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
  1. Среда разработки Python (выберите один вариант)

Вариант А: Использовать Conda (рекомендуется для изоляции среды).

conda create -n sd_webui python=3.10.6 -y
conda activate sd_webui

Вариант B: Непосредственно установить Python 3.10.6

  1. Запустите скрипт установки

В результате этого процесса будет создана виртуальная среда venv.

Окна:

.\webui-user.bat

Linux/Mac:

./webui.sh
  1. Устранение ошибки установки CLIP (если таковая возникла)

Если вы столкнулись с ошибками установки CLIP, например:

Сначала восстановите инструменты сборки в виртуальной среде, затем установите CLIP:

Окна:

.\venv\Scripts\python.exe -m pip install wheel
.\venv\Scripts\Python.exe -m pip install "setuptools<70"
.\venv\Scripts\python.exe -m pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1

Linux/Mac:

source venv/bin/activate
pip install wheel
pip install "setuptools<70"
pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1
deactivate
  1. Продолжите выполнение скрипта установки.

После исправления CLIP запустите установочный скрипт еще раз: Windows:

.\webui-user.bat

Linux/Mac:

./webui.sh

P.S.: Шаги для Linux/Mac лично не тестировались.

remote: Repository not found.
fatal: repository 'https://github.com/Stability-AI/stablediffusion.git/' not found

WhizZest commented on Feb 15, 2026

@WhizZest

@alekseyHunter You definitely didn't follow my steps precisely. The first step was to resolve the problem you encountered. Please refer to issue #17213 for details.

lynrayy commented on Feb 15, 2026

@lynrayy

"Run the Installation Script"

File name? There is no installation script

lynrayy commented on Feb 15, 2026

@lynrayy

Thank you, it working

shenghaizhang7-sketch commented on Feb 16, 2026

@shenghaizhang7-sketch

@alekseyHunter你显然没有严格按照我的步骤操作。第一步是解决你遇到的问题。详情请参考问题#17213 。

venv "D:\ai\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.10.1-93-gfd68e0c3
Commit hash: fd68e0c
Cloning Stable Diffusion into D:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai...
fatal: The empty string is not a valid path
Traceback (most recent call last):
File "D:\ai\stable-diffusion-webui\launch.py", line 53, in
main()
File "D:\ai\stable-diffusion-webui\launch.py", line 44, in main
prepare_environment()
File "D:\ai\stable-diffusion-webui\modules\launch_utils.py", line 444, in prepare_environment
git_clone(stable_diffusion_repo, repo_dir('stable-diffusion-stability-ai'), "Stable Diffusion", stable_diffusion_commit_hash)
File "D:\ai\stable-diffusion-webui\modules\launch_utils.py", line 190, in git_clone
run(f'"{git}" clone --config core.filemode=false "{url}" "{dir}"', f"Cloning {name} into {dir}...", f"Couldn't clone {name}", live=True)
File "D:\ai\stable-diffusion-webui\modules\launch_utils.py", line 114, in run
raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't clone Stable Diffusion.
Command: "git" clone --config core.filemode=false "
https://github.com/w-e-w/stablediffusion.git" "D:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"
Error code: 128

WhizZest commented on Feb 16, 2026

@WhizZest

@shenghaizhang7-sketch
这是一个 Git 克隆失败(error code 128),核心报错是:

fatal: The empty string is not a valid path

结合你的日志,可以精确定位问题来源。

一、真正的问题在哪?

关键命令被展开成了:

"git" clone --config core.filemode=false "
https://github.com/w-e-w/stablediffusion.git" 
"D:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"

注意这个 URL:

"
https://github.com/w-e-w/stablediffusion.git"

前面多了一个换行.

  • 这意味着:仓库 URL 变量里混入了非法字符(空字符串或换行)

而 Git 在解析路径时,把某段内容解析成了空路径 "",于是报:

The empty string is not a valid path

二、为什么会这样?

可能原因是,你手动修改了仓库地址,而且改的时候可能复制粘贴时带了:

  • 换行
  • 隐藏字符

虽然issue #17213 提到,如果不想切换dev分支,可以手动修改,但更推荐、更可靠的做法是切换到dev分支,手动修改很可能引发意想不到的错误。

shenghaizhang7-sketch commented on Feb 17, 2026

@shenghaizhang7-sketch

@shenghaizhang7-sketch 这是一个 Git 克隆失败(error code 128),核心报错是:

fatal: The empty string is not a valid path

结合你的日志,可以精确定位问题来源。

一、真正的问题在哪?

关键命令被展开成了:

"git" clone --config core.filemode=false "
https://github.com/w-e-w/stablediffusion.git" 
"D:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"

注意这个 URL:

"
https://github.com/w-e-w/stablediffusion.git"

前面多了一个换行.

  • 这意味着:仓库 URL 变量里混入了非法字符(空字符串或换行)

而 Git 在解析路径时,把某段内容解析成了空路径 "",于是报:

The empty string is not a valid path

二、为什么会这样?

可能原因是,你手动修改了仓库地址,而且改的时候可能复制粘贴时带了:

  • 换行
  • 隐藏字符

虽然issue #17213 提到,如果不想切换dev分支,可以手动修改,但更推荐、更可靠的做法是切换到dev分支,手动修改很可能引发意想不到的错误。

thankyou,but where can find that error and repair it.i follow your steps again,but the same error happened

shenghaizhang7-sketch commented on Feb 17, 2026

@shenghaizhang7-sketch

@shenghaizhang7-sketch 这是一个Git克隆失败(错误代码128),核心报错是:

fatal: The empty string is not a valid path

结合你的日志,可以准确定位问题来源。

一、真正的问题在哪?

关键命令已展开:

"git" clone --config core.filemode=false "
https://github.com/w-e-w/stablediffusion.git" 
"D:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai"

注意这个网址:

"
https://github.com/w-e-w/stablediffusion.git"

前面多了一个换行。

  • 这意味着:仓库URL变量里混入了非法字符(空字符串或换行)

而Git在解析路径时,把某段内容解析成了空路径“”,于是报:

The empty string is not a valid path

二、为什么会这样?

修改的原因可能是,你手动了仓库地址,而且修改的时候可能复制粘贴时带了:

  • 换行
  • 隐藏字符

虽然提到了问题#17213,如果不想切换开发分支,可以手动修改,但更推荐、更可靠的做法是切换到开发分支,手动修改很可能会引发同样的错误。

thankk you for help,i got it:)

emz-98 commented on Feb 21, 2026

@emz-98

I was going in circles getting this error about building the wheel, clip and error 128 I was losing my mind.

Here is the solution:
Step 1: After the authentication the URL it directs to was removed so it cannot collect the resources. Please create an SSH key in GITHUB and add to script in notepad to force the authentication. (use gpt to show you the steps to do this)

Step 2: Then use this URL created from another user https://github.com/joypaul162/Stability-AI-stablediffusion.git. This is the correct URL.
run-cmd
set STABLE_DIFFUSION_REPO=https://github.com/joypaul162/Stability-AI-stablediffusion.git

Run the bat file.
Step 3: The last step you will encounter running the bat file (AssertionError: Torch not compiled with CUDA enabled...Stable diffusion model failed to load). Please install missing torch,
run-cmd
pip install --upgrade torch==2.1.2+cu121 torchvision==0.16.2+cu121 --index-url https://download.pytorch.org/whl/cu121.

Open Stable-diffusion from the folder and run the bat file.

WhizZest commented on Feb 21, 2026

@WhizZest

I was going in circles getting this error about building the wheel, clip and error 128 I was losing my mind.

Here is the solution: Step 1: After the authentication the URL it directs to was removed so it cannot collect the resources. Please create an SSH key in GITHUB and add to script in notepad to force the authentication. (use gpt to show you the steps to do this)

Step 2: Then use this URL created from another user https://github.com/joypaul162/Stability-AI-stablediffusion.git. This is the correct URL. run-cmd set STABLE_DIFFUSION_REPO=https://github.com/joypaul162/Stability-AI-stablediffusion.git

Run the bat file. Step 3: The last step you will encounter running the bat file (AssertionError: Torch not compiled with CUDA enabled...Stable diffusion model failed to load). Please install missing torch, run-cmd pip install --upgrade torch==2.1.2+cu121 torchvision==0.16.2+cu121 --index-url https://download.pytorch.org/whl/cu121.

Open Stable-diffusion from the folder and run the bat file.

The error you encountered, "Error code: 128", is not related to this issue. You should look for issue #17213, which I mentioned earlier #17201 (comment).

PsychotropeRandom commented on Mar 13, 2026

@PsychotropeRandom
  1. Clone the Repository

Note: The main branch was last updated two years ago (2024), while the dev branch was last updated on December 18, 2025. According to feedback from issues #17213 and #17235, the dev branch works correctly, so we'll use it.

Option 1: Clone then switch to dev branch

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
git switch dev
git pull

Option 2: Directly clone dev branch

git clone -b dev https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
  1. Python Environment (Choose One Option)

Option A: Use Conda (Recommended for environment isolation)

conda create -n sd_webui python=3.10.6 -y
conda activate sd_webui

Option B: Directly install Python 3.10.6

  1. Run the Installation Script

This process will create a venv virtual environment.

Windows:

.\webui-user.bat

Linux/Mac:

./webui.sh
  1. Fix CLIP Installation Failure (If Encountered)

If you encounter CLIP installation errors like:

First repair the build tools in the venv environment, then install CLIP:

Windows:

.\venv\Scripts\python.exe -m pip install wheel
.\venv\Scripts\Python.exe -m pip install "setuptools<70"
.\venv\Scripts\python.exe -m pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1

Linux/Mac:

source venv/bin/activate
pip install wheel
pip install "setuptools<70"
pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1
deactivate
  1. Continue Running the Installation Script

After fixing CLIP, run the installation script again: Windows:

.\webui-user.bat

Linux/Mac:

./webui.sh

PS: Linux/Mac steps have not been tested personally.

Hi all, I'm installing Stable Diffusion and keep bumping into issues.
Right now i'm up to the CLIP issue mentioned above in step 4:

Fix CLIP Installation Failure (If Encountered)
If you encounter CLIP installation errors like:

ERROR: Failed to build '...

I do not know how to do this:

First repair the build tools in the venv environment, then install CLIP:

Windows:

.\venv\Scripts\python.exe -m pip install wheel
.\venv\Scripts\Python.exe -m pip install "setuptools<70"
.\venv\Scripts\python.exe -m pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cac

I will admit I am bumbling about and I am not proficient with these kind of actions, but would be very gratefull if I could some clearcut directions towards a solution :)

WhizZest commented on Mar 13, 2026

@WhizZest

Hi @PsychotropeRandom,

Good news! The CLIP installation issue has already been fixed in the development branch (dev branch) of the project. You don't need to run those complex commands if you use the correct branch.

Simplified Installation Guide (No Technical Knowledge Required)

  1. Download the dev branch directly

  2. Extract the zip file

    • Right-click the downloaded zip file and select "Extract All..."
    • Choose a folder to extract to (e.g., D:\AI\stable-diffusion-webui)
  3. Run the installation

    • Go to the extracted folder
    • Double-click webui-user.bat
    • The installation will run automatically, and the CLIP issue should be fixed
  4. Wait for completion

    • The script will install all dependencies, including CLIP
    • When it's done, you'll see a local URL like http://127.0.0.1:7860 in the window

Why this works:

The dev branch has a fix (PR #17293) that automatically handles the build dependencies for CLIP, so you don't need to run those complicated commands manually.

If you still have issues:

  1. Check if Git is installed

    • Press Windows Key + R
    • Type cmd and press Enter
    • Type git --version and press Enter
    • If you see a version number, Git is installed. If not, download it from https://git-scm.com/download/win
  2. Check Python version

    • Press Windows Key + R
    • Type cmd and press Enter
    • Type python --version and press Enter
    • You should see Python 3.10.x (recommended: 3.10.6)
    • If you have a different version, download Python 3.10.6 from https://www.python.org/downloads/release/python-3106/
    • During installation, make sure to check "Add Python to PATH"
  3. Other troubleshooting

    • Make sure you're using Windows 10 or 11
    • Ensure you have a stable internet connection
    • Try running webui-user.bat as Administrator (right-click and select "Run as administrator")

Let me know if you need further help!

PsychotropeRandom commented on Mar 14, 2026

@PsychotropeRandom

Thank you for the help, WhizZest.
I appreciate it, tremendously!

Sadly, no success yet.
Two friends assited me yesterday evening and we spend another couple of hours on this. I have an AMD GPU, so we also tried out anothe webui:

git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml && cd stable-diffusion-webui-directml && git submodule init && git submodule update

Still no luck. Annoyingly, different errors keep popping up.
Switched to python 3.11 at some point as directed by another forumposting but also without success.

I still wanted to thank you, though ;)

achuramesta-lab commented on Mar 27, 2026

@achuramesta-lab

Hola @PsychotropeRandom,

¡Buenas noticias! El problema de instalación de CLIP ya se ha solucionado en la rama de desarrollo (rama de desarrollo) del proyecto. No es necesario ejecutar esos comandos complejos si utiliza la rama correcta.

Guía de instalación simplificada (no se requiere conocimiento técnico)

1. **Descargar la rama de desarrollo directamente**
   
   * Vaya a este enlace: https://github.com/AUTOMATIC1111/stable-diffusion-webui/archive/refs/heads/dev.zip
   * Haga clic en "Descargar" para obtener la rama de desarrollo como un archivo zip

2. **Extraer el archivo zip**
   
   * Haga clic con el botón derecho en el archivo zip descargado y seleccione "Extraer todo..."
   * Elija una carpeta a la que extraer (p. ej., `D:\AI\stable-diffusion-webui`)

3. **Ejecutar la instalación**
   
   * Vaya a la carpeta extraída
   * Doble clic `webui-user.bat`
   * La instalación se ejecutará automáticamente y el problema de CLIP debe ser corregido

4. **Esperen a completar**
   
   * El script instalará todas las dependencias, incluido el CLIP
   * Cuando esté hecho, verás una URL local como  `http://127.0.0.1:7860`En la ventana

Por qué esto funciona:

La rama de desarrollo tiene una solución (PR #17293#17293) que maneja automáticamente las dependencias de compilación para CLIP, por lo que no es necesario ejecutar esos comandos complicados manualmente.

Si todavía tiene problemas:

1. **Comprueba si Git está instalado**
   
   * Prensa `Windows Key + R`
   * Tipo  `cmd`y pulse Enter
   * Tipo  `git --version`y pulse Enter
   * Si ve un número de versión, Git está instalado. Si no, descárguelo desde https://git-scm.com/download/win

2. **Comprueba la versión de Python**
   
   * Prensa `Windows Key + R`
   * Tipo  `cmd`y pulse Enter
   * Tipo  `python --version`y pulse Enter
   * Deberías ver Python 3.10.x (recomendado: 3.10.6)
   * Si tiene una versión diferente, descargue Python 3.10[.6 de https://www.python.org/downloads/release/python-3106/](https://www.python.org/downloads/release/python-3106/)
   * Durante la instalación, asegúrese de marcar "Añadir Python a PATH"

3. **Otra solución de problemas**
   
   * Asegúrese de que está utilizando Windows 10 u 11
   * Asegúrese de tener una conexión a Internet estable
   * Intenta correr  `webui-user.bat`como administrador (haga clic con el botón derecho y seleccione "Ejecutar como administrador")

¡Avísame si necesitas más ayuda!

Te amo hermano, antes tenia instalado A1111 sin problemas y tuve que borrar la pc y luego ya no podia hacer funcionar 1111, me estaba volviendo loco! te amo de verdad, gracias!!!

NekroSystemic commented on Jul 8, 2026

@NekroSystemic

安装 OpenAI CLIP: D:\proj\sd.webui\system\python\python.exe -m pip install --no-build-isolation "git+ https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1#egg=clip"

安装 OpenCLIP: D:\proj\sd.webui\system\python\python.exe -m pip install --no-build-isolation https://github.com/mlfoundations/open_clip/archive/bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b.zip

The link for "安装 OpenAI CLIP: D:\proj\sd.webui\system\python\python.exe -m pip install --no-build-isolation "git "
Does not exist. Can you reupload it again?

leongrayson5464-commits commented on Aug 18, 2026

@leongrayson5464-commits
  1. Clone the Repository

Note: The main branch was last updated two years ago (2024), while the dev branch was last updated on December 18, 2025. According to feedback from issues #17213 and #17235, the dev branch works correctly, so we'll use it.

Option 1: Clone then switch to dev branch

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
git switch dev
git pull

Option 2: Directly clone dev branch

git clone -b dev https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
  1. Python Environment (Choose One Option)

Option A: Use Conda (Recommended for environment isolation)

conda create -n sd_webui python=3.10.6 -y
conda activate sd_webui

Option B: Directly install Python 3.10.6

  1. Run the Installation Script

This process will create a venv virtual environment.

Windows:

.\webui-user.bat

Linux/Mac:

./webui.sh
  1. Fix CLIP Installation Failure (If Encountered)

If you encounter CLIP installation errors like:

First repair the build tools in the venv environment, then install CLIP:

Windows:

.\venv\Scripts\python.exe -m pip install wheel
.\venv\Scripts\Python.exe -m pip install "setuptools<70"
.\venv\Scripts\python.exe -m pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1

Linux/Mac:

source venv/bin/activate
pip install wheel
pip install "setuptools<70"
pip install --no-build-isolation git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1
deactivate
  1. Continue Running the Installation Script

After fixing CLIP, run the installation script again: Windows:

.\webui-user.bat

Linux/Mac:

./webui.sh

PS: Linux/Mac steps have not been tested personally.

Ok my only question since I'm having a similar issue, where do I put the venv stuff into? I'm new to doing this lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-reportReport of a bug, yet to be confirmed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions