Skip to content

Commit f9ead69

Browse files
authored
Merge pull request #56 from grokuku/test
2 parents 6c6bfde + 993d4d8 commit f9ead69

File tree

13 files changed

+143
-53
lines changed

13 files changed

+143
-53
lines changed

02.forge.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,26 @@ fi
3131
source activate ${SD02_DIR}/conda-env
3232
conda install -n base conda-libmamba-solver -y
3333
conda install -c conda-forge python=3.11 pip gcc gxx libcurand --solver=libmamba -y
34+
#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
3435

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

39-
#install dependencies
40+
#install custom requirements
4041
pip install --upgrade pip
41-
pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
42-
pip install packaging
43-
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
44-
pip install insightface
45-
pip install basicsr
46-
pip install xformers --index-url https://download.pytorch.org/whl/cu121
42+
43+
if [ -f ${SD02_DIR}/requirements.txt ]; then
44+
pip install -r ${SD02_DIR}/requirements.txt
45+
fi
46+
47+
48+
#pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
49+
#pip install packaging
50+
#pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
51+
#pip install insightface
52+
#pip install basicsr
53+
#pip install xformers --index-url https://download.pytorch.org/whl/cu121
4754

4855
# Merge Models, vae, lora, and hypernetworks, and outputs
4956
# Ignore move errors if they occur

02.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,28 @@ fi
3232
source activate ${SD02_DIR}/conda-env
3333
conda install -n base conda-libmamba-solver -y
3434
conda install -c conda-forge python=3.11 pip gcc gxx libcurand --solver=libmamba -y
35+
#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
3536

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

41-
# install dependencies
42+
# install custom requirements
4243
pip install --upgrade pip
43-
pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
44-
pip install packaging
45-
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
46-
pip install insightface
47-
pip install basicsr
48-
pip install xformers --index-url https://download.pytorch.org/whl/cu121
49-
pip install albumentations==1.4.3
50-
pip install pydantic==1.10.15
44+
45+
if [ -f ${SD02_DIR}/requirements.txt ]; then
46+
pip install -r ${SD02_DIR}/requirements.txt
47+
fi
48+
49+
#pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
50+
#pip install packaging
51+
#pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
52+
#pip install insightface
53+
#pip install basicsr
54+
#pip install xformers --index-url https://download.pytorch.org/whl/cu121
55+
#pip install albumentations==1.4.3
56+
#pip install pydantic==1.10.15
5157

5258

5359
# Merge Models, vae, lora, and hypernetworks, and outputs

03.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ fi
4646
pip install --use-pep517 --upgrade InvokeAI
4747
#invokeai-configure --yes --root ${SD03_DIR}/invokeai --skip-sd-weights
4848

49+
# install custom requirements
50+
pip install --upgrade pip
51+
52+
if [ -f ${SD03_DIR}/requirements.txt ]; then
53+
pip install -r ${SD03_DIR}/requirements.txt
54+
fi
55+
4956
# launch WebUI
5057
invokeai-web --config ${SD03_DIR}/config.yaml
5158
wait 99999

04.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,20 @@ if [ ! -d ${SD04_DIR}/webui/venv ]; then
4040
python -m venv venv
4141
fi
4242

43-
# install dependencies
43+
# install custom requirements
4444
cd ${SD04_DIR}/webui
4545
source venv/bin/activate
4646
pip install --upgrade pip
47-
pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
48-
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
49-
pip install insightface
50-
pip install basicsr
51-
pip install sqlalchemy
47+
48+
if [ -f ${SD04_DIR}/requirements.txt ]; then
49+
pip install -r ${SD04_DIR}/requirements.txt
50+
fi
51+
52+
# pip install coloredlogs flatbuffers numpy packaging protobuf==3.20.3 sympy
53+
# pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
54+
# pip install insightface
55+
# pip install basicsr
56+
# pip install sqlalchemy
5257
deactivate
5358

5459
#copy default parameters if absent

05.sh

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,17 @@ source activate ${SD05_DIR}/env
4343
conda install -n base conda-libmamba-solver -y
4444
conda install -c conda-forge git python=3.11 pip gxx libcurand --solver=libmamba -y
4545
conda install -c nvidia cuda-cudart --solver=libmamba -y
46-
pip install onnxruntime-gpu
47-
pip install insightface torch torchvision
48-
49-
install_requirements ${SD05_DIR}/ComfyUI/custom_nodes
46+
#pip install onnxruntime-gpu
47+
#pip install insightface torch>=2.2.2 torchvision opencv-python-headless>=4.9.0.80 huggingface-hub>=0.20.2 numpy>=1.24.4
48+
49+
#Install custom nodes dependencies if a clean Venv has been done
50+
if [ "$active_clean" = "1" ]; then
51+
echo "-------------------------------------"
52+
echo "Install Custom Nodes Dependencies"
53+
install_requirements ${SD05_DIR}/ComfyUI/custom_nodes
54+
echo "Done!"
55+
echo -e "-------------------------------------\n"
56+
fi
5057

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

7077
#install requirements
7178
cd ${SD05_DIR}/ComfyUI
79+
pip install --upgrade pip
7280
pip install -r requirements.txt
7381

82+
if [ -f ${SD05_DIR}/requirements.txt ]; then
83+
pip install -r ${SD05_DIR}/requirements.txt
84+
fi
85+
86+
7487
#run webui
7588
CMD="python3 main.py"
7689
while IFS= read -r param; do

06.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ sl_folder ${SD06_DIR}/Fooocus outputs ${BASE_DIR}/outputs 06-Fooocus
5454
#install requirements
5555
cd ${SD06_DIR}/Fooocus
5656
pip install -r requirements_versions.txt
57+
if [ -f ${SD06_DIR}/requirements.txt ]; then
58+
pip install -r ${SD06_DIR}/requirements.txt
59+
fi
5760

5861
#Launch webUI
5962
CMD="python launch.py"

07.sh

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
source /functions.sh
33

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

77
mkdir -p ${SD07_DIR}
8-
mkdir -p /config/outputs/07-StableSwarm
8+
mkdir -p /config/outputs/07-SwarmUI
99

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

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

2525
# check if remote is ahead of local
26-
cd ${SD07_DIR}/StableSwarmUI
26+
cd ${SD07_DIR}/SwarmUI
2727
check_remote
2828

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

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

45-
sl_folder ${SD07_DIR}/StableSwarmUI/Models Stable-Diffusion ${BASE_DIR}/models stable-diffusion
46-
sl_folder ${SD07_DIR}/StableSwarmUI/Models Lora ${BASE_DIR}/models lora
47-
sl_folder ${SD07_DIR}/StableSwarmUI/Models VAE ${BASE_DIR}/models vae
48-
sl_folder ${SD07_DIR}/StableSwarmUI/Models Embeddings ${BASE_DIR}/models embeddings
49-
sl_folder ${SD07_DIR}/StableSwarmUI/Models clip_vision ${BASE_DIR}/models clip_vision
50-
sl_folder ${SD07_DIR}/StableSwarmUI/Models controlnet ${BASE_DIR}/models controlnet
45+
sl_folder ${SD07_DIR}/SwarmUI/Models Stable-Diffusion ${BASE_DIR}/models stable-diffusion
46+
sl_folder ${SD07_DIR}/SwarmUI/Models Lora ${BASE_DIR}/models lora
47+
sl_folder ${SD07_DIR}/SwarmUI/Models VAE ${BASE_DIR}/models vae
48+
sl_folder ${SD07_DIR}/SwarmUI/Models Embeddings ${BASE_DIR}/models embeddings
49+
sl_folder ${SD07_DIR}/SwarmUI/Models clip_vision ${BASE_DIR}/models clip_vision
50+
sl_folder ${SD07_DIR}/SwarmUI/Models controlnet ${BASE_DIR}/models controlnet
5151

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

54-
#launch Stable Swarm
55-
cd ${SD07_DIR}/StableSwarmUI
54+
# install dependencies
55+
pip install --upgrade pip
56+
57+
if [ -f ${SD07_DIR}/requirements.txt ]; then
58+
pip install -r ${SD07_DIR}/requirements.txt
59+
fi
60+
61+
#launch SwarmUI
62+
cd ${SD07_DIR}/SwarmUI
5663
CMD="./launch-linux.sh"
5764
while IFS= read -r param; do
5865
if [[ $param != \#* ]]; then

50.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,15 @@ if [ ! -f "$SD50_DIR/parameters.txt" ]; then
2020
fi
2121

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

25-
pip3 install iopaint
24+
pip3 install --upgrade iopaint
25+
26+
# install custom requirements
27+
pip install --upgrade pip
28+
29+
if [ -f ${SD50_DIR}/requirements.txt ]; then
30+
pip install -r ${SD50_DIR}/requirements.txt
31+
fi
2632

2733
CMD="iopaint start"
2834
while IFS= read -r param; do

51.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ conda install -c conda-forge git python=3.11 pip gxx ffmpeg --solver=libmamba -y
3232

3333
cd ${SD51_DIR}/facefusion
3434
pip install -r requirements.txt
35+
36+
# install custom requirements
37+
pip install --upgrade pip
38+
39+
if [ -f ${SD51_DIR}/requirements.txt ]; then
40+
pip install -r ${SD51_DIR}/requirements.txt
41+
fi
42+
43+
3544
export GRADIO_SERVER_NAME=0.0.0.0
3645
export GRADIO_SERVER_PORT=9000
3746
CMD="python3 run.py"; while IFS= read -r param; do if [[ $param != \#* ]]; then CMD+=" ${param}"; fi; done < "${SD51_DIR}/parameters.txt"; eval $CMD

70.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ cd ${SD70_DIR}/kohya_ss
3737
python ./setup/setup_linux.py
3838
cd ${SD70_DIR}/kohya_ss
3939

40+
# install custom requirements
41+
if [ -f ${SD70_DIR}/requirements.txt ]; then
42+
pip install -r ${SD70_DIR}/requirements.txt
43+
fi
44+
4045
#launch Kohya
4146
echo LAUNCHING KOHYA_SS !
4247
CMD="python kohya_gui.py"; while IFS= read -r param; do if [[ $param != \#* ]]; then CMD+=" ${param}"; fi; done < "${SD70_DIR}/parameters.txt"; eval $CMD

0 commit comments

Comments
 (0)