Install Automatic1111 to M3
Overview
Teaching: 5 min min
Exercises: 0 minQuestions
How to install Automatic1111 and use the UI?
Objectives
3. Install Automatic1111 onto M3 with UI and GPU supported
One of the most popular UI for Stable Diffusion is Automatic1111 which is an open source project and can be found from their github: https://github.com/AUTOMATIC1111/stable-diffusion-webui
The following steps instruct you to install it on SMU M3, after creating the conda env and activate it in Step 1:
$ conda activate ~/sd
Download the model (either by gitclone or download zip file from their repo):
I encourage you to download it to your $WORK folder since you have plenty of space (avoid the limitted $HOME storage):
$ cd $WORK
$ git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
Next download one sample checkpoint (pre-trained model) for your usage.
I suggest to download one from HuggingFace, runwayml
- Navigate to https://huggingface.co/runwayml/stable-diffusion-v1-5
- Select Files and versions
- Right click and copy link address of the ckpt file
$ cd $WORK/stable-diffusion-webui/models/Stable-diffusion
$ wget https://huggingface.co/runwayml/stable-diffusion-v1-5/blob/main/v1-5-pruned-emaonly.ckpt
You can download as many checkpoint in the format of ckpt or safetensors to the models folder for your usage.
Run the executable: webui.sh
$ cd $WORK/stable-diffusion-webui
$ ./webui.sh
If you see the http link appear as in the screenshot below, copy it and paste to the Chrome browser from the Virtual Desktop:
Want to have shortcut?
Put the following line to your bashrc file:
$ echo alias sd1="'module load spack conda && module load cuda-11.8.0-gcc-11.2.0/cudnn/8.7.0.84-11.8-aydlfs6 cuda/gcc-11.2.0/cuda/11.8.0-vnha6cm && conda activate ~/sd && cd $WORK/stable-diffusion-webui && ./webui.sh'" >> ~/.bashrc
$ source ~/.bashrc
$ sd1
Key Points
Automatic1111, GUI