Я пытаюсь установить
Stable Diffusion
по туториалу из
https://reactor.cc/post/5352923
Я скачать репозиторий Stable Diffusion и модели на свой пк и попытался немного изменить файл webui.bat что бы он работал у меня на пк
@echo off
if not defined PYTHON (set PYTHON=C:\Users\Admin\AppData\Local\Programs\Python\Python310\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\Python310\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\Python310\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
Запустил его но получил ошибку
Traceback (most recent call last):
File "D:\Temp\Torrent\stable-diffusion-webui-master\launch.py", line 295, in <module>
start()
File "D:\Temp\Torrent\stable-diffusion-webui-master\launch.py", line 290, in start
webui.webui()
File "D:\Temp\Torrent\stable-diffusion-webui-master\webui.py", line 132, in webui
initialize()
File "D:\Temp\Torrent\stable-diffusion-webui-master\webui.py", line 62, in initialize
modules.sd_models.load_model()
File "D:\Temp\Torrent\stable-diffusion-webui-master\modules\sd_models.py", line 261, in load_model
load_model_weights(sd_model, checkpoint_info)
File "D:\Temp\Torrent\stable-diffusion-webui-master\modules\sd_models.py", line 191, in load_model_weights
sd = read_state_dict(checkpoint_file)
File "D:\Temp\Torrent\stable-diffusion-webui-master\modules\sd_models.py", line 173, in read_state_dict
sd = get_state_dict_from_checkpoint(pl_sd)
File "D:\Temp\Torrent\stable-diffusion-webui-master\modules\sd_models.py", line 147, in get_state_dict_from_checkpoint
pl_sd = pl_sd.pop("state_dict", pl_sd)
AttributeError: 'NoneType' object has no attribute 'pop'
Как можно это исправить?