Install Automatic1111's Stable Diffusion WebUI on any Linux machine, whether local, server, or Google Colab in just 2 easy steps. Follow the guide tailored to your specific machine.
- Comes with a handy Jupyter notebook for:
- Automatic installation of Automatic1111 and its requirements
- Easy model downloads
- Simple log management
- CPU and GPU scripts with publicly shareable links
- Real-time monitoring of machine resource usage
- Ensure port 8888 is open in the network firewall (for Jupyter server).
- Have the direct download link for your model (not the model page).
- Basic understanding of Jupyter Notebook.
- Previous experience with Automatic1111.
- If running on Google Colab, Colab Pro is mandatory.
- Locally on Linux
- Linux Web Server (e.g, Digital Ocean, AWS)
- Google Colab
- Open your terminal and run this command to automatically install and run the Jupyter notebook
git clone https://github.com/AyushDhimann/Stable-Diffusion-Linux && cd Stable-Diffusion-Linux && chmod +x linux.sh && sudo ./linux.sh
-
Check the console and you should see a jupyter notebook access link like
http://127.0.0.1:8888/?token=c8de56fa...
-
Now open the
RunStableDiffusion.ipynb
and skip to the Usage section.
-
Connect to your server using your preferred SSH Client.
-
Copy and Paste the below command in your console and run it.
git clone https://github.com/AyushDhimann/Stable-Diffusion-Linux && cd Stable-Diffusion-Linux && chmod +x server.sh && sudo ./server.sh
-
Check the console and you should see a jupyter notebook access link like
http://<YOUR-IP>:8888/?token=c8de56fa...
-
Now open the
RunStableDiffusion.ipynb
and skip to the Usage section.
This method is safer as it does not expose your jupyter notebook publically(even though it requires a unique access token).
-
Connect to your server using your preferred SSH Client.
-
Copy and Paste the below command in your console and run it.
git clone https://github.com/AyushDhimann/Stable-Diffusion-Linux && cd Stable-Diffusion-Linux && chmod +x linux.sh && sudo ./linux.sh
-
Open a new terminal in your local system and run the following:
ssh -L 8888:localhost:8888 <SERVER-USERNAME>@<YOUR-SERVER-IP/URL>
Replace the <YOUR-SERVER-IP/URL>
AND <SERVER-USERNAME>
with you actual Server IP/URL and user, then provide the server's password on the next step.
This will route a path from the server's localhost to your localhost.
-
Go back to the main console and you should see a jupyter notebook access link like
http://127.0.0.1:8888/?token=c8de56fa...
-
Now open the
RunStableDiffusion.ipynb
and skip to the Usage section.
-
Open this link https://colab.research.google.com/github/AyushDhimann/Stable-Diffusion-Linux/blob/main/RunStableDiffusionOnColab.ipynb
-
Skip to Usage Section
- Run the Installation process
- Obtain your model's download link and paste it.
MODEL_LINK = "https://civitai.com/api/download/models/501..
- Follow the download process.
- To download LoRa, VAE, etc., input the folder name as per Automatic1111's model folder and replace
MODEL_LINK
- Run the appropriate cell according to your needs, CPU or CPU+GPU. This will install all the requirements and run the WebUI
- Click on the URL to access your WebUI
- Credentials for the Webui are as follows: Username :
s
and Password :d
(Not applicable for Google Colab users)
Check the load and usage of your CPU and GPU:
-
Open a new terminal of the same machine.
-
Navigate to the directory where this repository is installed.
-
Run this command
./status.sh