Skip to content

Commit a45ffbc

Browse files
tildebyteafiaka87
authored andcommitted
TOIL(pip): Refactor pip requirements across the board (invoke-ai#531)
* Refactor pip requirements across the board Signed-off-by: Ben Alkov <[email protected]> * fix name, version in setup.py Signed-off-by: Ben Alkov <[email protected]> * Update notebooks for new requirements file changes Signed-off-by: Ben Alkov <[email protected]>
1 parent 1415589 commit a45ffbc

11 files changed

+183
-306
lines changed

notebooks/Stable-Diffusion-local-Windows.ipynb

Lines changed: 10 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -40,57 +40,9 @@
4040
"outputs": [],
4141
"source": [
4242
"%%cmd\n",
43-
"git clone https://github.com/lstein/stable-diffusion.git"
44-
]
45-
},
46-
{
47-
"cell_type": "code",
48-
"execution_count": null,
49-
"metadata": {},
50-
"outputs": [],
51-
"source": [
52-
"%cd stable-diffusion"
53-
]
54-
},
55-
{
56-
"cell_type": "code",
57-
"execution_count": null,
58-
"metadata": {},
59-
"outputs": [],
60-
"source": [
61-
"%%writefile requirements.txt\n",
62-
"albumentations==0.4.3\n",
63-
"einops==0.3.0\n",
64-
"huggingface-hub==0.8.1\n",
65-
"imageio-ffmpeg==0.4.2\n",
66-
"imageio==2.9.0\n",
67-
"kornia==0.6.0\n",
68-
"# pip will resolve the version which matches torch\n",
69-
"numpy\n",
70-
"omegaconf==2.1.1\n",
71-
"opencv-python==4.6.0.66\n",
72-
"pillow==9.2.0\n",
73-
"pip>=22\n",
74-
"pudb==2019.2\n",
75-
"pytorch-lightning==1.4.2\n",
76-
"streamlit==1.12.0\n",
77-
"# \"CompVis/taming-transformers\" doesn't work\n",
78-
"# ldm\\models\\autoencoder.py\", line 6, in <module>\n",
79-
"# from taming.modules.vqvae.quantize import VectorQuantizer2 as VectorQuantizer\n",
80-
"# ModuleNotFoundError\n",
81-
"taming-transformers-rom1504==0.0.6\n",
82-
"test-tube>=0.7.5\n",
83-
"torch-fidelity==0.3.0\n",
84-
"torchmetrics==0.6.0\n",
85-
"transformers==4.19.2\n",
86-
"git+https://github.com/openai/CLIP.git@main#egg=clip\n",
87-
"git+https://github.com/lstein/k-diffusion.git@master#egg=k-diffusion\n",
88-
"# No CUDA in PyPi builds\n",
89-
"--extra-index-url https://download.pytorch.org/whl/cu113 --trusted-host https://download.pytorch.org\n",
90-
"torch==1.11.0\n",
91-
"# Same as numpy - let pip do its thing\n",
92-
"torchvision\n",
93-
"-e .\n"
43+
"git clone https://github.com/lstein/stable-diffusion.git\n",
44+
"cd /content/stable-diffusion/\n",
45+
"git checkout --quiet development"
9446
]
9547
},
9648
{
@@ -100,22 +52,22 @@
10052
"outputs": [],
10153
"source": [
10254
"%%cmd\n",
103-
"pew new --python 3.10 -r requirements.txt --dont-activate ldm"
55+
"pew new --python 3.10 -r requirements-lin-win-colab-CUDA.txt --dont-activate stable-diffusion"
10456
]
10557
},
10658
{
10759
"cell_type": "markdown",
10860
"metadata": {},
10961
"source": [
110-
"# Switch the notebook kernel to the new 'ldm' environment!\n",
62+
"# Switch the notebook kernel to the new 'stable-diffusion' environment!\n",
11163
"\n",
11264
"## VSCode: restart VSCode and come back to this cell\n",
11365
"\n",
11466
"1. Ctrl+Shift+P\n",
11567
"1. Type \"Select Interpreter\" and select \"Jupyter: Select Interpreter to Start Jupyter Server\"\n",
11668
"1. VSCode will say that it needs to install packages. Click the \"Install\" button.\n",
11769
"1. Once the install is finished, do 1 & 2 again\n",
118-
"1. Pick 'ldm'\n",
70+
"1. Pick 'stable-diffusion'\n",
11971
"1. Run the following cell"
12072
]
12173
},
@@ -136,7 +88,7 @@
13688
"## Jupyter/JupyterLab\n",
13789
"\n",
13890
"1. Run the cell below\n",
139-
"1. Click on the toolbar where it says \"(ipyknel)\" ↗️. You should get a pop-up asking you to \"Select Kernel\". Pick 'ldm' from the drop-down.\n"
91+
"1. Click on the toolbar where it says \"(ipyknel)\" ↗️. You should get a pop-up asking you to \"Select Kernel\". Pick 'stable-diffusion' from the drop-down.\n"
14092
]
14193
},
14294
{
@@ -154,9 +106,9 @@
154106
"source": [
155107
"# DO NOT RUN THIS CELL IF YOU ARE USING VSCODE!!\n",
156108
"%%cmd\n",
157-
"pew workon ldm\n",
109+
"pew workon stable-diffusion\n",
158110
"pip3 install ipykernel\n",
159-
"python -m ipykernel install --name=ldm"
111+
"python -m ipykernel install --name=stable-diffusion"
160112
]
161113
},
162114
{
@@ -231,7 +183,7 @@
231183
"Now:\n",
232184
"\n",
233185
"1. `cd` to wherever the 'stable-diffusion' directory is\n",
234-
"1. Run `pew workon ldm`\n",
186+
"1. Run `pew workon stable-diffusion`\n",
235187
"1. Run `winpty python scripts\\dream.py`"
236188
]
237189
}

0 commit comments

Comments
 (0)