Run Stable Diffusion 3 on your own machine with ComfyUI

📰 Replicate Blog

Run Stable Diffusion 3 on your own machine with ComfyUI, a graphical user interface for Stable Diffusion models

intermediate Published 14 Jun 2024
Action Steps
  1. Install Cog, a tool for packaging and running machine learning models
  2. Clone the ComfyUI repository from GitHub
  3. Start ComfyUI by downloading weights and starting the web server
Who Needs to Know This

AI engineers and data scientists can benefit from this tutorial to run Stable Diffusion 3 locally on their GPU-equipped machines, while product managers and designers can use ComfyUI to create custom images without coding

Key Insight

💡 ComfyUI provides a graphical user interface for Stable Diffusion models, allowing users to create custom images without coding

Share This
🖼️ Run Stable Diffusion 3 on your own machine with ComfyUI! 💻

Key Takeaways

Run Stable Diffusion 3 on your own machine with ComfyUI, a graphical user interface for Stable Diffusion models

Full Article

# Run Stable Diffusion 3 on your own machine with ComfyUI – Replicate blog

[Replicate has joined Cloudflare](https://replicate.com/blog/replicate-cloudflare)

[](https://replicate.com/)

cmd+k

[Explore](https://replicate.com/explore)[Pricing](https://replicate.com/pricing)[Enterprise](https://replicate.com/enterprise)[Docs](https://replicate.com/docs)[Blog](https://replicate.com/blog)[Sign in](https://replicate.com/signin)[Try for free](https://replicate.com/signin)

Menu

[Explore](https://replicate.com/explore)[Pricing](https://replicate.com/pricing)[Enterprise](https://replicate.com/enterprise)[Docs](https://replicate.com/docs)[Blog](https://replicate.com/blog)[Sign in](https://replicate.com/signin)[Try for free](https://replicate.com/signin)

* * *

[Compare models in the Playground](https://replicate.com/playground)

* Replicate
* [Blog](https://replicate.com/blog)

# Run Stable Diffusion 3 on your own machine with ComfyUI

Posted June 14, 2024 by
* [zsxkib](https://replicate.com/zsxkib)
* [zeke](https://replicate.com/zeke)

Stable Diffusion 3 (SD3) just dropped and you can [run it in the cloud on Replicate](https://replicate.com/stability-ai/stable-diffusion-3), but it’s also possible to run it locally using ComfyUI right from your own GPU-equipped machine.

## [](https://replicate.com/blog/run-sd3-on-comfyui#what-is-stable-diffusion-3)What is Stable Diffusion 3?

Stable Diffusion 3 (SD3) is the latest version of Stability AI’s tool that creates images from text. It’s faster and makes better images than older versions. SD3 is really good at making complex scenes with lots of details and clear text from the prompt.

![Image 1: SD3 and Comfy](https://replicate.com/_content/assets/wizard-sign-their-left-hand.B9-yoiLv_5w9YL.webp)

A wizard holding two signs, one in their left hand with the label ‘SD3’ and one in their right hand with the label ‘COMFY’“

## [](https://replicate.com/blog/run-sd3-on-comfyui#what-is-comfyui)What is ComfyUI?

ComfyUI is a graphical user interface (GUI) for Stable Diffusion models like SD3. It lets you connect different AI models (called nodes) together to create custom images, just like connecting Lego blocks. You don’t need to know any code to use it. ComfyUI makes it fun and simple to try out different combinations (called “workflows”) and make unique pictures.

A special thanks to [comfyanonymous](https://github.com/comfyanonymous) for creating ComfyUI and [fofr](https://github.com/fofr) for creating a [Cog compatiable version of it](https://github.com/fofr/cog-comfyui-sd3)

## [](https://replicate.com/blog/run-sd3-on-comfyui#prerequisites)Prerequisites

To follow this guide, you’ll need:

* A GPU-equipped machine (NVIDIA GPU with at least 8GB VRAM recommended)
* The ability to copy and paste into terminal 😉

## [](https://replicate.com/blog/run-sd3-on-comfyui#step-1-install-cog)Step 1: Install Cog

Start by installing [Cog](https://github.com/replicate/cog). It’s a tool that sets up everything you need to package and run a machine learning model in a container environment. Open your terminal and run these commands:

sudo curl -o /usr/local/bin/cog -L “[https://github.com/replicate/cog/releases/latest/download/cog_$(uname](https://github.com/replicate/cog/releases/latest/download/cog_$(uname) -s)_$(uname -m)” sudo chmod +x /usr/local/bin/cog

## [](https://replicate.com/blog/run-sd3-on-comfyui#step-2-clone-the-comfyui-repository)Step 2: Clone the ComfyUI repository

Next, clone the ComfyUI code from GitHub:

git clone —recurse-submodules [git@github.com](mailto:git@github.com):fofr/cog-comfyui-sd3.git cd cog-comfyui-sd3

## [](https://replicate.com/blog/run-sd3-on-comfyui#step-3-start-comfyui)Step 3: Start ComfyUI

Start ComfyUI. Run this command to download weights and start the ComfyUI web server:

sudo cog run —use-cog-base-image -p 8188 /bin/bash -c “python scripts/get_weights.py workflow_api.json && cd ComfyUI/ && python main.py —listen 0.0.0.0”

This might take a while,
Read full article → ← Back to Reads

Related Videos

5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
5 Levels of AI Agents - From Simple LLM Calls to Multi-Agent Systems
Dave Ebbelaar (LLM Eng)
4 Generative AI Projects That Will Get You Hired in 2026 🚀
4 Generative AI Projects That Will Get You Hired in 2026 🚀
SCALER
I Tested My AI-Powered Autocoder With 3 Different LLM Models
I Tested My AI-Powered Autocoder With 3 Different LLM Models
Making Made Easy
You Can Run Your Own Powerful LLM AI On Almost Any Computer! OPEN SOURCE! NO GPU NEEDED! MISTRAL 7B!
You Can Run Your Own Powerful LLM AI On Almost Any Computer! OPEN SOURCE! NO GPU NEEDED! MISTRAL 7B!
Making Made Easy
How To Run Mistral 7B LLM AI At Full Precision On A Raspberry Pi 5 With 4GB Of RAM #Overload
How To Run Mistral 7B LLM AI At Full Precision On A Raspberry Pi 5 With 4GB Of RAM #Overload
Making Made Easy
Google's Secret AI That's 10X More Powerful Than ChatGPT
Google's Secret AI That's 10X More Powerful Than ChatGPT
Kevin Farugia AI Automation