Enter the code below into a cell (swap out XXXX's with your Google Drive link ID) :
!pip install gdown
!gdown
https://drive.google.com/uc?id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX!git clone
https://github.com/AUTOMATIC1111/stable-diffusion-webuiShift + Enter to run (or click the Play button above).
After the cell runs, change your working directory to SD with the code below:
cd stable-diffusion-webui
Now you can run this line to setup an environment:
!conda env create -f environment-wsl2.yaml
Once it's done setting up (10 minutes usually, pytorch takes forever), open up a new tab in your jupyter lab. In the File Browser on the Left, make sure the Stable Diffusion directory is open. Otherwise, you'll have to use cd to navigate to it in terminal.
Click on TERMINAL. Terminal will open up. Type in each line below ONE LINE AT A TIME and hit ENTER. Make sure you're in workspace/stable-diffusion-webui
source /opt/conda/etc/profile.d/
conda.shconda activate automatic
apt-get install ffmpeg libsm6 libxext6 -y
On the FILE BROWSER on the left, Find the SD model you downloaded in the top directory. Right click on it, CUT, and PASTE it into stable-diffusion-webui/MODELS/stable-diffusion
In terminal, you can now run:
python
launch.py --share
After it downloads dependencies and a bunch of other stuff, it will give you a sharable link to open up a Gradio Interface. Copy this link (Highlight, Hold down SHIFT, and right click) and open up the link in your browser.
Now you can have fun with Stable Diffusion. You can download images through the GRADIO interface by hitting SAVE and Download. Or you can just download your entire "outputs" folder from Jupyter Lab after you finish a session.
If it ever crashes, hit ctrl + C in terminal and run the launch line again. Grab the new link.