Run a Stable Diffusion image model in Google Colab

Devanshu Agarwal

Written by Devanshu Agarwal /

This guide shows one way to experiment with a Stable Diffusion-style image model in Google Colab. It is not an official Midjourney guide, it is not affiliated with Midjourney, and it does not provide unlimited image generation. Google Colab, model hosts, and third-party notebooks can change their limits, terms, and availability at any time.

Use this as a learning workflow, not as a guarantee that a specific notebook or model will always run.

What you need

  • A Google account for Google Colab.
  • A Colab notebook that launches a compatible Stable Diffusion web UI.
  • A model checkpoint you have permission to use.
  • Time to review model licenses, safety settings, and output rights before publishing any generated image.

Step 1: open the Colab notebook

The original workflow used this notebook:

Google Colab notebook

Open it in Google Colab and review the code before running it. Third-party notebooks can install packages, download files, and expose temporary URLs, so it is worth reading the cells first.

Step 2: choose a model

The earlier version of this article used the RMADA Merge model:

RMADA Merge model

Before downloading any model, check the model page for license terms, allowed uses, and content restrictions. If you plan to use generated images commercially, do not skip this step.

Step 3: upload or edit the notebook

If you downloaded the notebook file, open Google Colab and choose File > Upload notebook. If you are opening it directly from GitHub, use Colab's "Open in Colab" flow.

The older notebook required replacing model download lines:

Screenshot showing where to replace lines in the Google Colab notebook with the model download code

Example model download commands:

!curl -Lo rmada.safetensors https://civitai.com/api/download/models/33340?type=Model&format=SafeTensor
!mv "/content/rmada.safetensors" "/content/stable-diffusion-webui/models/Stable-diffusion"

Only run commands like these if you trust the source and understand where the files are being downloaded from.

Step 4: run the notebook

Click the run button in Colab and wait for the setup cells to finish.

Screenshot of the Run button in Google Colab

Setup can take several minutes. Free Colab runtimes can be interrupted, rate-limited, or unavailable depending on Google's current policies and your usage.

Step 5: open the generated interface

When the notebook finishes launching the web UI, it usually prints a temporary URL. Open that URL to access the image generation interface.

AI image generation dashboard showing prompt fields and settings for Stable Diffusion

Keep in mind that temporary URLs are public while active. Do not enter private prompts, personal data, or sensitive business details.

Prompting tips

Start with a simple prompt and add detail gradually. For example:

a small ceramic turtle on a wooden desk, soft window light, realistic photo

Then adjust one thing at a time: lighting, composition, camera angle, style, or subject. If the interface supports negative prompts, use them to reduce unwanted artifacts rather than stuffing the prompt with every quality keyword you can find.

Safety and quality checks

Before using an output:

  • Check the model license and the notebook license.
  • Review the generated image for artifacts, accidental logos, unsafe content, or resemblance to real people.
  • Avoid claiming the image was made by a brand or tool that was not actually used.
  • Keep notes on the model, settings, and prompt if you need to reproduce the result later.

Example outputs

Here are two sample images from the older workflow:

Example AI-generated photorealistic image of a cat created using the RMADA Merge model Example AI-generated turtle image created using the RMADA Merge model

This setup is useful for learning how Stable Diffusion-style tools work, but it is not a substitute for checking licenses, platform limits, and image rights before publishing.