All articles
AI Tools

ComfyUI Beginners Guide: Generate AI Images Locally Without Paying a Single Rupee

Midjourney is great, but it costs money and censors your prompts. ComfyUI is a free, node-based interface that lets you run Stable Diffusion on your own computer. Here is the absolute beginner's guide to setting it up.

·9 min
ComfyUI Beginners Guide: Generate AI Images Locally Without Paying a Single Rupee

The Midjourney Trap

Everyone loves Midjourney. It makes beautiful images with almost no effort. But eventually, you hit a wall.

First, it costs $30/month. Second, it's trapped inside Discord, which is a terrible interface for professional workflows. Third, and most importantly, you have zero control. If you want to keep a character's face exactly the same across 10 different images, or if you want to turn a pencil sketch into a photorealistic render, Midjourney just kind of guesses what you want.

If you want true control, and you want it completely free, you need to run Stable Diffusion locally. And the best way to do that right now is with a tool called ComfyUI.

What is ComfyUI?

What is ComfyUI?

ComfyUI is a node-based graphical interface for AI image generation. If you've ever used Blender's material nodes or Unreal Engine's Blueprints, you will feel right at home.

Instead of typing a prompt and praying, ComfyUI lets you visually wire together the entire generation pipeline. You connect a "Checkpoint Loader" (your model) to a "Prompt Text Box", and wire that into a "KSampler" (the engine that creates the image), which finally pipes into a "Save Image" node.

It looks intimidating at first glance, but it is actually incredibly logical. Once you understand the basic flow, you have god-like control over your images.

Step 1: Installing ComfyUI (The Easy Way)

You need a computer with a dedicated GPU (Nvidia is heavily preferred, but Mac Apple Silicon works fine too).

  1. Go to the ComfyUI GitHub repository.
  2. If you are on Windows, scroll down to "Installing" and click the direct link to download the standalone .7z package.
  3. Extract the folder to your C: drive.
  4. Double-click the run_nvidia_gpu.bat file.

A terminal will pop up, do some initial setup, and then open a browser window at http://127.0.0.1:8188. You will see a blank grid canvas. You have successfully installed ComfyUI.

Step 2: Getting the 'Brain' (Models)

ComfyUI is just an interface. It doesn't come with any AI models out of the box because they are massive files.

The best site to download models is Civitai.com.

  • Go to Civitai and search for a model. For extreme realism, I recommend downloading the Juggernaut XL model (it uses the SDXL base architecture).
  • Download the .safetensors file. Be warned: it's about 6.5 GB.
  • Once downloaded, move that file into your ComfyUI folder under: ComfyUI/models/checkpoints/.
  • Refresh your ComfyUI browser tab.

Step 3: Your First Generation

ComfyUI comes with a default workflow already set up on the canvas.

  1. On the far left, find the Load Checkpoint node. Click the dropdown and select the Juggernaut XL model you just downloaded.
  2. Find the two CLIP Text Encode nodes. The top one is your Positive Prompt. Type: "Cinematic portrait of a cyberpunk hacker, neon lighting, highly detailed, 8k resolution."
  3. The bottom text node is your Negative Prompt. Type: "ugly, blurry, low resolution, deformed fingers."
  4. On the far right, hit the giant Queue Prompt button.

You will see a green outline move through the nodes as it processes. When it hits the KSampler, your GPU fans will spin up. A few seconds later, an incredibly high-quality, un-censored, free image will appear in the Save Image node.

The Real Magic: Custom Workflows

The default workflow is boring. The magic of ComfyUI is that you can download other people's workflows as JSON files (or simply by dragging and dropping an image generated by ComfyUI into your browser).

Want to use ControlNet to force the AI to make an image that perfectly matches a stick-figure sketch? There's a workflow for that. Want to use IPAdapter to swap your face onto a superhero body? There's a workflow for that. Want to upscale a low-res image to 4K using AI? Just wire an Upscale Model node into your pipeline.

ComfyUI turns AI image generation from a slot machine into a professional tool. Stop paying subscriptions and start building your own studio today.

FAQ

Does ComfyUI work on Mac?

Yes. Apple Silicon (M1/M2/M3) chips run ComfyUI surprisingly well using Apple's MPS (Metal Performance Shaders) backend. It takes a bit more terminal knowledge to install than Windows, though.

Is it safe to download models from Civitai?

Generally yes, but ALWAYS ensure the file extension is '.safetensors'. Never download older '.ckpt' files, as they can theoretically contain malicious code. '.safetensors' files are physically incapable of executing code.

Why did my generation take 5 minutes?

If you don't have enough VRAM on your GPU, ComfyUI will spill the model into your system RAM (which is very slow). SDXL models require about 8GB of VRAM. If you have less, try downloading older SD1.5 based models, which run perfectly on 4GB GPUs.

Explore RuView on GitHub

Browse the Rust engine, ESP32 firmware and examples.

RuView GitHub