mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Set MALLOC_MMAP_THRESHOLD_=1048576 by default in invoke.sh. And add it to the manual installation docs.
This commit is contained in:
@ -256,6 +256,10 @@ manager, please follow these steps:
|
|||||||
*highly recommended** if your virtual environment is located outside of
|
*highly recommended** if your virtual environment is located outside of
|
||||||
your runtime directory.
|
your runtime directory.
|
||||||
|
|
||||||
|
!!! tip
|
||||||
|
|
||||||
|
On linux, it is recommended to run invokeai with the following env var: `MALLOC_MMAP_THRESHOLD_=1048576`. For example: `MALLOC_MMAP_THRESHOLD_=1048576 invokeai --web`. This helps to prevent memory fragmentation that can lead to memory accumulation over time. This env var is set automatically when running via `invoke.sh`.
|
||||||
|
|
||||||
10. Render away!
|
10. Render away!
|
||||||
|
|
||||||
Browse the [features](../features/index.md) section to learn about all the
|
Browse the [features](../features/index.md) section to learn about all the
|
||||||
|
@ -46,6 +46,9 @@ if [ "$(uname -s)" == "Darwin" ]; then
|
|||||||
export PYTORCH_ENABLE_MPS_FALLBACK=1
|
export PYTORCH_ENABLE_MPS_FALLBACK=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Avoid glibc memory fragmentation. See invokeai/backend/model_management/README.md for details.
|
||||||
|
export MALLOC_MMAP_THRESHOLD_=1048576
|
||||||
|
|
||||||
# Primary function for the case statement to determine user input
|
# Primary function for the case statement to determine user input
|
||||||
do_choice() {
|
do_choice() {
|
||||||
case $1 in
|
case $1 in
|
||||||
|
Reference in New Issue
Block a user