Skip to content

Commit

Permalink
unbreak colab. Again. Argh.
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Sep 10, 2023
1 parent 6202228 commit d555c15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion colab/colab-notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"drive.mount('/content/drive')\n",
"SWARMPATH = '/content/drive/MyDrive'\n",
"\n",
"# Colab fails to save venv to drive, so just screw it do a global install of pip reqs if we used a comfy backend in the drive\n",
"# Colab breaks venvs, and doesn't save anything valid to drive, so just screw it do a global install of pip reqs if we used a comfy backend in the drive\n",
"!if [[ -f \"$SWARMPATH/StableSwarmUI/dlbackend/ComfyUI/requirements.txt\" ]]; then rm -rf $SWARMPATH/StableSwarmUI/dlbackend/ComfyUI/venv/; pip install -r $SWARMPATH/StableSwarmUI/dlbackend/ComfyUI/requirements.txt; fi"
]
},
Expand All @@ -46,6 +46,9 @@
"os.environ['SWARMPATH'] = SWARMPATH\n",
"%cd $SWARMPATH\n",
"\n",
"# Colab breaks venv, so, tell swarm to not make a venv\n",
"os.environ['SWARM_NO_VENV'] = 'true'\n",
"\n",
"# Download StableSwarmUI\n",
"url = \"https://github.com/Stability\" + \"-AI/StableSwarmUI\"\n",
"!git clone $url"
Expand Down
7 changes: 5 additions & 2 deletions launchtools/comfy-install-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ git clone https://github.com/comfyanonymous/ComfyUI

cd ComfyUI

python3 -m venv venv
if [ -z "${SWARM_NO_VENV}" ]; then

. venv/bin/activate
python3 -m venv venv

. venv/bin/activate
fi

pip install -r requirements.txt

0 comments on commit d555c15

Please sign in to comment.