Google Colab only: Minimal steps to run Stable Diffusion
Steps to try image generation using only the free tier of Google Colab from an 8GB mini PC without external GPU. We don't put the model locally, so even with 8GB of RAM it works.
Image generation is one of the heaviest tasks for a low-spec PC without an external GPU. Trying to run it locally, an 8GB PC with no GPU is basically a dead end. That's where Google Colab comes in. The local PC sticks to being a "terminal for operating the browser."
Bottom line: We generated one image with Stable Diffusion on the free tier of Colab. About 6 minutes including downloading the model, generation is 20-40 seconds per image. The PC's memory usage is just the browser — under 1GB.
Basis of this method
- Have a Google account
- Use Colab's free tier (no paid plan needed)
- Download the generated image from Google Drive or the PC
- The free tier varies in time and GPU allocation, so expect waiting during congestion
The contents of the free tier can change without notice. This article is a record of an experiment from November 2026.
Overall flow
Step 1: Create the notebook in Colab
- Go to Google Colab and create a new notebook.
- From the menu, open "Runtime" → "Change runtime type".
- Select GPU in the hardware accelerator. If a GPU isn't shown on the free tier, wait and retry.
If you run it without a GPU being assigned, it becomes slow with CPU generation. Check this first.
Step 2: Install what you need
!pip install -q diffusers transformers accelerate safetensors
Colab's environment resets per session. You need to run this cell every time you open.
Step 3: Load the model and generate
import torch
from diffusers import StableDiffusionPipeline
pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5",
torch_dtype=torch.float16
).to("cuda")
image = pipe("a small notebook pc on a wooden desk, warm light").images[0]
image.save("sample.png")
The first time takes several minutes to download the model. From the second time onward, the cache works within the session. While generating, don't close the browser tab.
Free tier note: Long continuous use can limit the GPU allocation. Safer habits: try short sessions, disconnect the runtime when not using it.
Why not do it on the local PC?
To run Stable Diffusion locally, you need to hold the model and inference memory simultaneously. With 8GB PC RAM / no external GPU, you don't get there at the model load point alone. Even with 32GB of RAM, CPU generation is very slow and not practical.
The point of keeping low-spec PCs working is to separate "do it locally" from "let the cloud do it."
Summary
Even with 8GB / no external GPU, Colab's free tier lets you experience image generation. The key is: don't put the model locally. If you bring the results back, the PC's burden is almost nothing.