@zeni1agent

Как исправить "no such option: --prefer-binary"?

Я пытаюсь установить и запустить stable diffusion.
Мой bat
@echo off

if not defined PYTHON (set PYTHON=C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe)
if not defined VENV_DIR (set VENV_DIR=venv)

set ERROR_REPORTING=FALSE

set COMMANDLINE_ARGS=--skip-torch-cuda-test


mkdir tmp 2>NUL

%PYTHON% -c "" >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :start_venv
echo Couldn't launch python
goto :show_stdout_stderr

:start_venv
if [%VENV_DIR%] == [-] goto :skip_venv

dir C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :activate_venv

for /f "delims=" %%i in ('CALL %PYTHON% -c "import sys; print(sys.executable)"') do set PYTHON_FULLNAME="%%i"
echo Creating venv in directory %VENV_DIR% using python %PYTHON_FULLNAME%
%PYTHON_FULLNAME% -m venv %VENV_DIR% >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :activate_venv
echo Unable to create venv in directory %VENV_DIR%
goto :show_stdout_stderr

:activate_venv
set PYTHON="C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe"
echo venv %PYTHON%
if [%ACCELERATE%] == ["True"] goto :accelerate
goto :launch

:skip_venv

:accelerate
echo "Checking for accelerate"
set ACCELERATE="%~dp0%VENV_DIR%\Scripts\accelerate.exe"
if EXIST %ACCELERATE% goto :accelerate_launch

:launch
%PYTHON% launch.py %*
pause
exit /b

:accelerate_launch
echo "Accelerating"
%ACCELERATE% launch --num_cpu_threads_per_process=6 launch.py
pause
exit /b

:show_stdout_stderr

echo.
echo exit code: %errorlevel%

for /f %%i in ("tmp\stdout.txt") do set size=%%~zi
if %size% equ 0 goto :show_stderr
echo.
echo stdout:
type tmp\stdout.txt

:show_stderr
for /f %%i in ("tmp\stderr.txt") do set size=%%~zi
if %size% equ 0 goto :show_stderr
echo.
echo stderr:
type tmp\stderr.txt

:endofscript

echo.
echo Launch unsuccessful. Exiting.
pause


Но получаю ошибку
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
Commit hash: <none>
Installing gfpgan
Traceback (most recent call last):
  File "launch.py", line 294, in <module>
    prepare_enviroment()
  File "launch.py", line 212, in prepare_enviroment
    run_pip(f"install {gfpgan_package}", "gfpgan")
  File "launch.py", line 78, in run_pip
    return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
  File "launch.py", line 49, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 2
stdout: <empty>
stderr:
Usage:
  C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe -m pip install [options] <requirement specifier> [package-index-options] ...
  C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe -m pip install [options] -r <requirements file> [package-index-options] ...
  C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe -m pip install [options] [-e] <vcs project url> ...
  C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe -m pip install [options] [-e] <local project path> ...
  C:\Users\Admin\AppData\Local\Programs\Python\Python37\python.exe -m pip install [options] <archive url/path> ...

no such option: --prefer-binary

Может ли кто ни будь объяснить как это исправить?
  • Вопрос задан
  • 194 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы