Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stable-diffusion-webui
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
stable-diffusion-webui
Commits
0a54bd33
Commit
0a54bd33
authored
Nov 09, 2022
by
d8ahazard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Optional Accelerate Launch
parent
ac085628
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
4 deletions
+31
-4
requirements.txt
requirements.txt
+1
-0
requirements_versions.txt
requirements_versions.txt
+1
-0
webui-user.bat
webui-user.bat
+1
-0
webui-user.sh
webui-user.sh
+3
-0
webui.bat
webui.bat
+13
-0
webui.sh
webui.sh
+12
-4
No files found.
requirements.txt
View file @
0a54bd33
accelerate
basicsr
basicsr
diffusers
diffusers
fairscale
==0.4.4
fairscale
==0.4.4
...
...
requirements_versions.txt
View file @
0a54bd33
transformers==4.19.2
transformers==4.19.2
diffusers==0.3.0
diffusers==0.3.0
accelerate==0.12.0
basicsr==1.4.2
basicsr==1.4.2
gfpgan==1.3.8
gfpgan==1.3.8
gradio==3.9
gradio==3.9
...
...
webui-user.bat
View file @
0a54bd33
...
@@ -4,5 +4,6 @@ set PYTHON=
...
@@ -4,5 +4,6 @@ set PYTHON=
set GIT=
set GIT=
set VENV_DIR=
set VENV_DIR=
set COMMANDLINE_ARGS=
set COMMANDLINE_ARGS=
set ACCELERATE=
call webui.bat
call webui.bat
webui-user.sh
View file @
0a54bd33
...
@@ -40,4 +40,7 @@ export COMMANDLINE_ARGS=""
...
@@ -40,4 +40,7 @@ export COMMANDLINE_ARGS=""
#export CODEFORMER_COMMIT_HASH=""
#export CODEFORMER_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""
# Uncomment to enable accelerated launch
#export ACCELERATE="True"
###########################################
###########################################
webui.bat
View file @
0a54bd33
...
@@ -28,15 +28,28 @@ goto :show_stdout_stderr
...
@@ -28,15 +28,28 @@ goto :show_stdout_stderr
:activate_venv
:activate_venv
set PYTHON="%~dp0%VENV_DIR%\Scripts\Python.exe"
set PYTHON="%~dp0%VENV_DIR%\Scripts\Python.exe"
echo venv %PYTHON%
echo venv %PYTHON%
if [%ACCELERATE%] == ["True"] goto :accelerate
goto :launch
goto :launch
:skip_venv
:skip_venv
:accelerate
echo "Checking for accelerate"
dir %VENV_DIR%\Scripts\accelerate.exe >tmp/stdout.txt 2>tmp/stderr.txt
if %ERRORLEVEL% == 0 goto :accelerate_launch
:launch
:launch
%PYTHON% launch.py %*
%PYTHON% launch.py %*
pause
pause
exit /b
exit /b
:accelerate_launch
echo "Accelerating2"
set ACCELERATE="%~dp0%VENV_DIR%\Scripts\accelerate.exe"
%ACCELERATE% launch --num_cpu_threads_per_process=6 launch.py
pause
exit /b
:show_stdout_stderr
:show_stdout_stderr
echo.
echo.
...
...
webui.sh
View file @
0a54bd33
...
@@ -134,7 +134,15 @@ else
...
@@ -134,7 +134,15 @@ else
exit
1
exit
1
fi
fi
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
if
[[
!
-z
"
${
ACCELERATE
}
"
]]
&&
[
${
ACCELERATE
}
=
"True"
]
&&
[
-x
"
$(
command
-v
accelerate
)
"
]
printf
"Launching launch.py..."
then
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
"
${
python_cmd
}
"
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
printf
"Accelerating launch.py..."
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
accelerate launch
--num_cpu_threads_per_process
=
6
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
else
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"Launching launch.py..."
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
"
${
python_cmd
}
"
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment