DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to generate images locally with a single command with Stable Diffusion CPP

Download the sd binary and a model, then make images from a text prompt with no Python setup.

Short answer: Download a pre-built sd binary from the releases page, or build it from source with the build guide; then download weights, for example curl -L -O https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors; generate an image: ./bin/sd-cli -m ../models/v1-5-pruned-emaonly.safetensors -p "a lovely cat". All steps.

  • Top pick
  • Content
  • Beginner
  • 20 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor

Who it is forA developer or artist who wants local image generation without installing a Python environment or a web UI.

The problemMost local image generators need a big Python install and a GPU setup that breaks easily.

The outcomeA PNG generated on your own machine, with the generation settings embedded in the file.

What you need first

  • The sd executable from the releases page, or a build from source following the build guide
  • Model weights in .ckpt, .safetensors or .gguf format
  • Linux, macOS or Windows; Android works through Termux
  • Enough RAM or VRAM for the model; the performance guide covers reducing it

Steps

  1. Download a pre-built sd binary from the releases page, or build it from source with the build guide
  2. Download weights, for example curl -L -O https://huggingface.co/stable-diffusion-v1-5/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors
  3. Generate an image: ./bin/sd-cli -m ../models/v1-5-pruned-emaonly.safetensors -p "a lovely cat"
  4. Check the cli doc for options such as negative prompt, sampling method and seed
  5. Open the output PNG; the generation parameters are embedded as webui-compatible text

Prompt for your agent

Download the latest leejet/stable-diffusion.cpp release for my OS, fetch Stable Diffusion v1.5 weights and generate 4 images of <prompt> with sd-cli, each with a different seed. Save them to <folder> and list the exact commands you ran.

Caveat. The README warns that the API and command-line options change frequently, so check the cli doc for your release.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for leejet/stable-diffusion.cpp and "Generate images locally with a single command"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer