Run Stable Diffusion on Your Old Laptop or MacBook: A Cloud Inference Guide
Bypass hardware limitations and unleash your AI art potential with cloud services.
Stable Diffusion is the best free AI image generation tool, but its hardware demands can be limiting. This guide shows you how to use cloud Inference services to access its power from any computer, regardless of specifications.
Published Mar 6, 2024 • 10 minutes read
![Cover Image](https://i.ibb.co/f0GPtdm/0001-cover.webp)
Introduction
Stable Diffusion just published its new version - Stable Diffusion 3. It outperforms state-of-the-art text-to-image generation systems such as DALL·E 3, Midjourney v6, and Ideogram v1 in typography and prompt adherence, based on human preference evaluations.
Compared to other image generation models, e.g. Midjourney, Stable Diffusion has more control over the image and is free to use. The only barrier stopping many users is the hardware requirement. To install Stable Diffusion on your computer, you would need a dedicated graphics card from NVIDIA or AMD and at least 4GB of GPU memory.
But what if you don't have a dedicated graphics card? What if you are using an old laptop or MacBook? What if you are using a computer without a GPU? This guide will show you how to bypass these hardware limitations and unleash your AI art potential with cloud services.
![architecture](https://i.ibb.co/TMk2Ffq/a-powerful-graphics-card.webp)
Step-by-Step Guide
Step 1: Install Python and Git
First, you need to install Python 3.10.6 and Git on your computer. Both Windows and Mac users can find the Python 3.10.6 download link here: Python 3.10.6. For Git, you can download the installer from the Git official website: Windows | macOS
Step 2: Install Stable Diffusion Web UI
After you have installed Python and Git, you can install the Stable Diffusion Web UI by running the following command in your terminal:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
Then, you can start the web UI by running webui-user.bat on Windows or running the following command on macOS:
cd stable-diffusion-webui
./webui.sh
Step 3: Access Stable Diffusion Web UI
When starting the Web UI for the first time, it will automatically set up the environment and download the Stable Diffusion model. After the setup is done, the Web UI page will be opened in your default browser. You can access the Web UI by visiting the provided link.
If there is an error saying loading the model failed due to the lack of GPU memory, don't worry. You can continue to the next step to use cloud API services.
![webui-startup](https://i.ibb.co/3mzH2pd/sd-webui.webp)
Step 4: Set Up Cloud Inference Services
There are a few online services available for Stable Diffusion cloud inference, e.g. Paperspace, Runpod, Kaggle, and Omniinfer. In this guide, we will use Omniinfer as an example.
First, install the sd-webui-cloud-inference extension through the Web UI. In the Web UI interface, switch to the Extension tab, and the Install from URL sub-tab. Then, paste the link from sd-webui-cloud-inference GitHub and click the install button.
To finish the installation, switch to the Installed sub-tab, and click the "Apply and Restart" button. After the restart, you can see the Cloud Inference tab in the Web UI interface.
![install-from-url](https://i.ibb.co/sw7gDpw/install-from-url.webp)
![apply-and-restart](https://i.ibb.co/mFbYWxV/apply-and-restart.webp)
Step 5: Set omniinfer.io Key
After you have installed the sd-webui-cloud-inference extension, you can set up your omniinfer.io key by clicking the Cloud Inference tab in the Web UI interface. In order to get the key, you need to sign up on omniinfer.io and copy the API key. Once you have pasted the API key into the Web UI, press "Test Connection" to ensure success.
![enable-cloud-inference](https://i.ibb.co/1zkRzfV/cloud-inference.webp)
![omni-key](https://i.ibb.co/XWFq7ck/omni.webp)
Step 6: Start Cloud Inference
Now, you can start cloud inference by checking the Enable Cloud Inference field in the txt2img or img2img interface. Then select your preferred "Checkpoint", adjust the prompts, and click the "Generate" button to generate the image.
![cloud-result](https://i.ibb.co/xhktb4b/cloud-result.webp)
Advanced Topics
For advanced topics such as "img2img inpaint", "Lora", "ControlNet", and "VAE", please find the tutorial on the sd-webui-cloud-inference official repository.
Summary
The article provides a comprehensive guide to utilizing Stable Diffusion, a text-to-image generation system, even without dedicated GPU hardware. It outlines step-by-step instructions, starting with the installation of Python and Git, followed by setting up the Stable Diffusion Web UI. Additionally, it discusses accessing the Web UI, overcoming hardware limitations through cloud inference services like Omniinfer, and setting up cloud inference extensions. The guide concludes with instructions on starting cloud inference and provides resources for further exploration of advanced topics. Overall, the article empowers users to unleash their AI art potential by leveraging cloud services and advanced image generation techniques offered by Stable Diffusion.
![generated-zzai](https://i.ibb.co/k06Vcbt/generated-zzai.webp)