Skip to content
Merged

Test #56

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions 02.forge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,26 @@ fi
source activate ${SD02_DIR}/conda-env
conda install -n base conda-libmamba-solver -y
conda install -c conda-forge python=3.11 pip gcc gxx libcurand --solver=libmamba -y
#conda install pytorch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 pytorch-cuda=12.1 -c pytorch -c nvidia --solver=libmamba -y

if [ ! -f "$SD02_DIR/parameters.forge.txt" ]; then
cp -v "/opt/sd-install/parameters/02.forge.txt" "$SD02_DIR/parameters.forge.txt"
fi

#install dependencies
#install custom requirements
pip install --upgrade pip
pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
pip install packaging
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
pip install insightface
pip install basicsr
pip install xformers --index-url https://download.pytorch.org/whl/cu121

if [ -f ${SD02_DIR}/requirements.txt ]; then
pip install -r ${SD02_DIR}/requirements.txt
fi


#pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
#pip install packaging
#pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
#pip install insightface
#pip install basicsr
#pip install xformers --index-url https://download.pytorch.org/whl/cu121

# Merge Models, vae, lora, and hypernetworks, and outputs
# Ignore move errors if they occur
Expand Down
24 changes: 15 additions & 9 deletions 02.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,28 @@ fi
source activate ${SD02_DIR}/conda-env
conda install -n base conda-libmamba-solver -y
conda install -c conda-forge python=3.11 pip gcc gxx libcurand --solver=libmamba -y
#conda install pytorch==2.3.0 torchvision==0.18.0 torchaudio==2.3.0 pytorch-cuda=12.1 -c pytorch -c nvidia --solver=libmamba -y

#copy default parameters if absent
if [ ! -f "$SD02_DIR/parameters.txt" ]; then
cp -v "/opt/sd-install/parameters/02.txt" "$SD02_DIR/parameters.txt"
fi

# install dependencies
# install custom requirements
pip install --upgrade pip
pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
pip install packaging
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
pip install insightface
pip install basicsr
pip install xformers --index-url https://download.pytorch.org/whl/cu121
pip install albumentations==1.4.3
pip install pydantic==1.10.15

if [ -f ${SD02_DIR}/requirements.txt ]; then
pip install -r ${SD02_DIR}/requirements.txt
fi

#pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
#pip install packaging
#pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
#pip install insightface
#pip install basicsr
#pip install xformers --index-url https://download.pytorch.org/whl/cu121
#pip install albumentations==1.4.3
#pip install pydantic==1.10.15


# Merge Models, vae, lora, and hypernetworks, and outputs
Expand Down
7 changes: 7 additions & 0 deletions 03.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ fi
pip install --use-pep517 --upgrade InvokeAI
#invokeai-configure --yes --root ${SD03_DIR}/invokeai --skip-sd-weights

# install custom requirements
pip install --upgrade pip

if [ -f ${SD03_DIR}/requirements.txt ]; then
pip install -r ${SD03_DIR}/requirements.txt
fi

# launch WebUI
invokeai-web --config ${SD03_DIR}/config.yaml
wait 99999
17 changes: 11 additions & 6 deletions 04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,20 @@ if [ ! -d ${SD04_DIR}/webui/venv ]; then
python -m venv venv
fi

# install dependencies
# install custom requirements
cd ${SD04_DIR}/webui
source venv/bin/activate
pip install --upgrade pip
pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
pip install insightface
pip install basicsr
pip install sqlalchemy

if [ -f ${SD04_DIR}/requirements.txt ]; then
pip install -r ${SD04_DIR}/requirements.txt
fi

# pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
# pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
# pip install insightface
# pip install basicsr
# pip install sqlalchemy
deactivate

#copy default parameters if absent
Expand Down
21 changes: 17 additions & 4 deletions 05.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,17 @@ source activate ${SD05_DIR}/env
conda install -n base conda-libmamba-solver -y
conda install -c conda-forge git python=3.11 pip gxx libcurand --solver=libmamba -y
conda install -c nvidia cuda-cudart --solver=libmamba -y
pip install onnxruntime-gpu
pip install insightface torch torchvision

install_requirements ${SD05_DIR}/ComfyUI/custom_nodes
#pip install onnxruntime-gpu
#pip install insightface torch>=2.2.2 torchvision opencv-python-headless>=4.9.0.80 huggingface-hub>=0.20.2 numpy>=1.24.4

#Install custom nodes dependencies if a clean Venv has been done
if [ "$active_clean" = "1" ]; then
echo "-------------------------------------"
echo "Install Custom Nodes Dependencies"
install_requirements ${SD05_DIR}/ComfyUI/custom_nodes
echo "Done!"
echo -e "-------------------------------------\n"
fi

#clean old venv if it still exists
if [ -d ${SD05_DIR}/venv ]; then
Expand All @@ -69,8 +76,14 @@ sl_folder ${SD05_DIR}/ComfyUI/models controlnet ${BASE_DIR}/models controlnet

#install requirements
cd ${SD05_DIR}/ComfyUI
pip install --upgrade pip
pip install -r requirements.txt

if [ -f ${SD05_DIR}/requirements.txt ]; then
pip install -r ${SD05_DIR}/requirements.txt
fi


#run webui
CMD="python3 main.py"
while IFS= read -r param; do
Expand Down
3 changes: 3 additions & 0 deletions 06.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ sl_folder ${SD06_DIR}/Fooocus outputs ${BASE_DIR}/outputs 06-Fooocus
#install requirements
cd ${SD06_DIR}/Fooocus
pip install -r requirements_versions.txt
if [ -f ${SD06_DIR}/requirements.txt ]; then
pip install -r ${SD06_DIR}/requirements.txt
fi

#Launch webUI
CMD="python launch.py"
Expand Down
37 changes: 22 additions & 15 deletions 07.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
source /functions.sh

export PATH="/home/abc/miniconda3/bin:$PATH"
export SD07_DIR=${BASE_DIR}/07-StableSwarm
export SD07_DIR=${BASE_DIR}/07-SwarmUI

mkdir -p ${SD07_DIR}
mkdir -p /config/outputs/07-StableSwarm
mkdir -p /config/outputs/07-SwarmUI

#remove old venv if still exists
if [ -d ${SD07_DIR}/venv ]; then
Expand All @@ -18,12 +18,12 @@ if [ ! -f "$SD07_DIR/parameters.txt" ]; then
fi

#clone repository if new install
if [ ! -d ${SD07_DIR}/StableSwarmUI ]; then
cd "${SD07_DIR}" && git clone https://github.com/Stability-AI/StableSwarmUI.git
if [ ! -d ${SD07_DIR}/SwarmUI ]; then
cd "${SD07_DIR}" && git clone https://github.com/mcmonkeyprojects/SwarmUI.git
fi

# check if remote is ahead of local
cd ${SD07_DIR}/StableSwarmUI
cd ${SD07_DIR}/SwarmUI
check_remote

#clean conda env if needed
Expand All @@ -40,19 +40,26 @@ conda install -n base conda-libmamba-solver -y
conda install -c conda-forge git python=3.11 pip --solver=libmamba -y

#move models to common folder and create symlinks
mkdir -p ${SD07_DIR}/StableSwarmUI/Models
mkdir -p ${SD07_DIR}/SwarmUI/Models

sl_folder ${SD07_DIR}/StableSwarmUI/Models Stable-Diffusion ${BASE_DIR}/models stable-diffusion
sl_folder ${SD07_DIR}/StableSwarmUI/Models Lora ${BASE_DIR}/models lora
sl_folder ${SD07_DIR}/StableSwarmUI/Models VAE ${BASE_DIR}/models vae
sl_folder ${SD07_DIR}/StableSwarmUI/Models Embeddings ${BASE_DIR}/models embeddings
sl_folder ${SD07_DIR}/StableSwarmUI/Models clip_vision ${BASE_DIR}/models clip_vision
sl_folder ${SD07_DIR}/StableSwarmUI/Models controlnet ${BASE_DIR}/models controlnet
sl_folder ${SD07_DIR}/SwarmUI/Models Stable-Diffusion ${BASE_DIR}/models stable-diffusion
sl_folder ${SD07_DIR}/SwarmUI/Models Lora ${BASE_DIR}/models lora
sl_folder ${SD07_DIR}/SwarmUI/Models VAE ${BASE_DIR}/models vae
sl_folder ${SD07_DIR}/SwarmUI/Models Embeddings ${BASE_DIR}/models embeddings
sl_folder ${SD07_DIR}/SwarmUI/Models clip_vision ${BASE_DIR}/models clip_vision
sl_folder ${SD07_DIR}/SwarmUI/Models controlnet ${BASE_DIR}/models controlnet

sl_folder ${SD07_DIR}/StableSwarmUI Output ${BASE_DIR}/outputs 07-StableSwarm
sl_folder ${SD07_DIR}/SwarmUI Output ${BASE_DIR}/outputs 07-Swarm

#launch Stable Swarm
cd ${SD07_DIR}/StableSwarmUI
# install dependencies
pip install --upgrade pip

if [ -f ${SD07_DIR}/requirements.txt ]; then
pip install -r ${SD07_DIR}/requirements.txt
fi

#launch SwarmUI
cd ${SD07_DIR}/SwarmUI
CMD="./launch-linux.sh"
while IFS= read -r param; do
if [[ $param != \#* ]]; then
Expand Down
10 changes: 8 additions & 2 deletions 50.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ if [ ! -f "$SD50_DIR/parameters.txt" ]; then
fi

cd ${SD50_DIR}/IOPaint
#pip install -r requirements.txt

pip3 install iopaint
pip3 install --upgrade iopaint

# install custom requirements
pip install --upgrade pip

if [ -f ${SD50_DIR}/requirements.txt ]; then
pip install -r ${SD50_DIR}/requirements.txt
fi

CMD="iopaint start"
while IFS= read -r param; do
Expand Down
9 changes: 9 additions & 0 deletions 51.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ conda install -c conda-forge git python=3.11 pip gxx ffmpeg --solver=libmamba -y

cd ${SD51_DIR}/facefusion
pip install -r requirements.txt

# install custom requirements
pip install --upgrade pip

if [ -f ${SD51_DIR}/requirements.txt ]; then
pip install -r ${SD51_DIR}/requirements.txt
fi


export GRADIO_SERVER_NAME=0.0.0.0
export GRADIO_SERVER_PORT=9000
CMD="python3 run.py"; while IFS= read -r param; do if [[ $param != \#* ]]; then CMD+=" ${param}"; fi; done < "${SD51_DIR}/parameters.txt"; eval $CMD
Expand Down
5 changes: 5 additions & 0 deletions 70.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ cd ${SD70_DIR}/kohya_ss
python ./setup/setup_linux.py
cd ${SD70_DIR}/kohya_ss

# install custom requirements
if [ -f ${SD70_DIR}/requirements.txt ]; then
pip install -r ${SD70_DIR}/requirements.txt
fi

#launch Kohya
echo LAUNCHING KOHYA_SS !
CMD="python kohya_gui.py"; while IFS= read -r param; do if [[ $param != \#* ]]; then CMD+=" ${param}"; fi; done < "${SD70_DIR}/parameters.txt"; eval $CMD
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Please consult each respective website for a comprehensive description and usage
| 04 | SD.Next | This project started as a fork from Automatic1111 WebUI and it grew significantly | https://github.com/vladmandic/automatic |
| 05 | ComfyUI | A powerful and modular stable diffusion GUI and backend | https://github.com/comfyanonymous/ComfyUI |
| 06 | Fooocus | Fooocus is a rethinking of Stable Diffusion and Midjourney’s designs | https://github.com/lllyasviel/Fooocus |
| 07 | StableSwarm | A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility. | https://github.com/Stability-AI/StableSwarmUI |
| 07 | SwarmUI | A Modular Stable Diffusion Web-User-Interface, with an emphasis on making powertools easily accessible, high performance, and extensibility. | https://github.com/mcmonkeyprojects/SwarmUI |
| 50 | Lama Cleaner | A free and open-source inpainting tool powered by SOTA AI model. | https://github.com/Sanster/lama-cleaner |
| 51 | FaceFusion | Next generation face swapper and enhancer | https://github.com/facefusion/facefusion |
| 70 | Kohya | Kohya's GUI provides a Windows-focused Gradio GUI for Kohya's Stable Diffusion trainers | https://github.com/bmaltais/kohya_ss |
Expand All @@ -36,7 +36,7 @@ docker compose --profile invoke-ai up # http://<server_ip>:9003
docker compose --profile sd-next up # http://<server_ip>:9004
docker compose --profile comfy-ui up # http://<server_ip>:9005
docker compose --profile fooocus up # http://<server_ip>:9006
docker compose --profile stable-swarm up # http://<server_ip>:9007
docker compose --profile swarmui up # http://<server_ip>:9007
docker compose --profile lama-cleaner up # http://<server_ip>:9050
docker compose --profile face-fusion up # http://<server_ip>:9051
docker compose --profile kohya up # http://<server_ip>:9070
Expand Down Expand Up @@ -72,7 +72,7 @@ make start invoke-ai # http://<server_ip>:9003
make start sd-next # http://<server_ip>:9004
make start comfy-ui # http://<server_ip>:9005
make start fooocus # http://<server_ip>:9006
make start stable-swarm # http://<server_ip>:9007
make start swarmui # http://<server_ip>:9007
make start lama-cleaner # http://<server_ip>:9050
make start face-fusion # http://<server_ip>:9051
make start kohya # http://<server_ip>:9070
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ services:
ports:
- ${FOOOCUS_PORT:-9006}:9000/tcp

stable-diffusion-stable-swarm:
stable-diffusion-swarmui:
<<: *default-service
profiles: [stable-swarm]
container_name: stable-diffusion-stable-swarm
profiles: [swarmui]
container_name: stable-diffusion-swarmui
environment:
<<: *default-environment
WEBUI_VERSION: '07'
ports:
- ${STABLE_SWARM_PORT:-9007}:9000/tcp
- ${SWARMUI_PORT:-9007}:9000/tcp

stable-diffusion-lama-cleaner:
<<: *default-service
Expand Down
28 changes: 25 additions & 3 deletions functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,23 @@ fi
}

# Fonction récursive pour installer les requirements.txt
#install_requirements() {
# local directory="$1"
# local requirements_file="$directory/requirements.txt"

# if [ -f "$requirements_file" ]; then
# echo "Installation des dépendances dans $directory ..."
# pip install -r "$requirements_file"
# echo "Dépendances installées avec succès dans $directory."
# fi

# # Parcours récursif des sous-dossiers
# for subdir in "$directory"/*; do
# if [ -d "$subdir" ]; then
# install_requirements "$subdir"
# fi
# done
#}
install_requirements() {
local directory="$1"
local requirements_file="$directory/requirements.txt"
Expand All @@ -65,10 +82,15 @@ install_requirements() {
echo "Dépendances installées avec succès dans $directory."
fi

# Parcours récursif des sous-dossiers
# Parcours des sous-dossiers du premier niveau uniquement
for subdir in "$directory"/*; do
if [ -d "$subdir" ]; then
install_requirements "$subdir"
local subdir_requirements_file="$subdir/requirements.txt"
if [ -f "$subdir_requirements_file" ]; then
echo "Installation des dépendances dans $subdir ..."
pip install -r "$subdir_requirements_file"
echo "Dépendances installées avec succès dans $subdir."
fi
fi
done
}
}