From 5ffa2999a6a5f0bf47168f7901ed0e2808a0fd36 Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 30 Jun 2024 10:41:37 +0200 Subject: [PATCH 1/3] fix dependencies --- 02.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/02.sh b/02.sh index b49c8fc..25990b6 100755 --- a/02.sh +++ b/02.sh @@ -32,6 +32,7 @@ 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 From e604e0abb14ce4ce5c0ec6fca54926e157289c14 Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 30 Jun 2024 10:58:37 +0200 Subject: [PATCH 2/3] test fix dependencies --- 02.forge.sh | 13 +++++++------ 02.sh | 18 +++++++++--------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/02.forge.sh b/02.forge.sh index 9f1f323..d5657a2 100644 --- a/02.forge.sh +++ b/02.forge.sh @@ -31,6 +31,7 @@ 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" @@ -38,12 +39,12 @@ fi #install dependencies 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 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 diff --git a/02.sh b/02.sh index 25990b6..b37dd14 100755 --- a/02.sh +++ b/02.sh @@ -32,7 +32,7 @@ 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 +#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 @@ -41,14 +41,14 @@ fi # install dependencies 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 +#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 From abddaf0d5ea2565df5158b011bc7400bb255231c Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 30 Jun 2024 11:43:35 +0200 Subject: [PATCH 3/3] added custom requirements --- 02.forge.sh | 8 +++++++- 02.sh | 7 ++++++- 03.sh | 7 +++++++ 04.sh | 17 +++++++++++------ 05.sh | 10 ++++++++-- 06.sh | 3 +++ 07.sh | 7 +++++++ 50.sh | 8 +++++++- 51.sh | 9 +++++++++ 70.sh | 5 +++++ 10 files changed, 70 insertions(+), 11 deletions(-) diff --git a/02.forge.sh b/02.forge.sh index d5657a2..d2b49b6 100644 --- a/02.forge.sh +++ b/02.forge.sh @@ -37,8 +37,14 @@ 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 + +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/ diff --git a/02.sh b/02.sh index b37dd14..2c07420 100755 --- a/02.sh +++ b/02.sh @@ -39,8 +39,13 @@ 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 + +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/ diff --git a/03.sh b/03.sh index 75fe69f..ab73140 100755 --- a/03.sh +++ b/03.sh @@ -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 \ No newline at end of file diff --git a/04.sh b/04.sh index e0fdbb1..4db2710 100755 --- a/04.sh +++ b/04.sh @@ -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 diff --git a/05.sh b/05.sh index 58fe7ea..c4b05ae 100755 --- a/05.sh +++ b/05.sh @@ -43,8 +43,8 @@ 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>=2.2.2 torchvision opencv-python-headless>=4.9.0.80 huggingface-hub>=0.20.2 numpy>=1.24.4 +#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 @@ -76,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 diff --git a/06.sh b/06.sh index 78d92f5..5487058 100755 --- a/06.sh +++ b/06.sh @@ -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" diff --git a/07.sh b/07.sh index 24e5b01..6ed4dbe 100755 --- a/07.sh +++ b/07.sh @@ -51,6 +51,13 @@ sl_folder ${SD07_DIR}/SwarmUI/Models controlnet ${BASE_DIR}/models controlnet sl_folder ${SD07_DIR}/SwarmUI Output ${BASE_DIR}/outputs 07-Swarm +# 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" diff --git a/50.sh b/50.sh index 2b23508..9eb2de9 100755 --- a/50.sh +++ b/50.sh @@ -20,10 +20,16 @@ if [ ! -f "$SD50_DIR/parameters.txt" ]; then fi cd ${SD50_DIR}/IOPaint -#pip install -r requirements.txt 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 if [[ $param != \#* ]]; then diff --git a/51.sh b/51.sh index 8a53ceb..4eafa07 100755 --- a/51.sh +++ b/51.sh @@ -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 diff --git a/70.sh b/70.sh index 90dde6f..c029367 100755 --- a/70.sh +++ b/70.sh @@ -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