Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
8af4b3bb
Commit
8af4b3bb
authored
Apr 13, 2023
by
gk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try using TCMalloc on Linux by default
parent
22bcc7be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
README.md
README.md
+1
-0
webui-user.sh
webui-user.sh
+3
-0
webui.sh
webui.sh
+18
-3
No files found.
README.md
View file @
8af4b3bb
...
@@ -120,6 +120,7 @@ sudo pacman -S wget git python3
...
@@ -120,6 +120,7 @@ sudo pacman -S wget git python3
bash <
(
wget
-qO-
https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
)
bash <
(
wget
-qO-
https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh
)
```
```
3.
Run
`webui.sh`
.
3.
Run
`webui.sh`
.
4.
Check
`webui-user.sh`
for options.
### Installation on Apple Silicon
### Installation on Apple Silicon
Find the instructions
[
here
](
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Installation-on-Apple-Silicon
)
.
Find the instructions
[
here
](
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Installation-on-Apple-Silicon
)
.
...
...
webui-user.sh
View file @
8af4b3bb
...
@@ -43,4 +43,7 @@
...
@@ -43,4 +43,7 @@
# Uncomment to enable accelerated launch
# Uncomment to enable accelerated launch
#export ACCELERATE="True"
#export ACCELERATE="True"
# Uncomment to disable TCMalloc
#export NO_TCMALLOC="True"
###########################################
###########################################
webui.sh
View file @
8af4b3bb
...
@@ -172,15 +172,30 @@ else
...
@@ -172,15 +172,30 @@ else
exit
1
exit
1
fi
fi
# Try using TCMalloc on Linux
prepare_tcmalloc
()
{
if
[[
"
${
OSTYPE
}
"
==
"linux"
*
]]
&&
[[
-z
"
${
NO_TCMALLOC
}
"
]]
&&
[[
-z
"
${
LD_PRELOAD
}
"
]]
;
then
TCMALLOC
=
"
$(
ldconfig
-p
|
grep
-Po
"libtcmalloc.so.
\d
"
|
head
-n
1
)
"
if
[[
!
-z
"
${
TCMALLOC
}
"
]]
;
then
echo
"Using TCMalloc:
${
TCMALLOC
}
"
export
LD_PRELOAD
=
"
${
TCMALLOC
}
"
else
printf
"
\e
[1m
\e
[31mCannot locate TCMalloc (improves CPU memory usage)
\e
[0m
\n
"
fi
fi
}
if
[[
!
-z
"
${
ACCELERATE
}
"
]]
&&
[
${
ACCELERATE
}
=
"True"
]
&&
[
-x
"
$(
command
-v
accelerate
)
"
]
if
[[
!
-z
"
${
ACCELERATE
}
"
]]
&&
[
${
ACCELERATE
}
=
"True"
]
&&
[
-x
"
$(
command
-v
accelerate
)
"
]
then
then
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"Accelerating launch.py..."
printf
"Accelerating launch.py..."
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
prepare_tcmalloc
exec
accelerate launch
--num_cpu_threads_per_process
=
6
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
exec
accelerate launch
--num_cpu_threads_per_process
=
6
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
else
else
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"Launching launch.py..."
printf
"Launching launch.py..."
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
printf
"
\n
%s
\n
"
"
${
delimiter
}
"
prepare_tcmalloc
exec
"
${
python_cmd
}
"
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
exec
"
${
python_cmd
}
"
"
${
LAUNCH_SCRIPT
}
"
"
$@
"
fi
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