explaingit

lllyasviel/fooocus

48,513PythonAudience · vibe coderComplexity · 2/5MaintainedLicenseSetup · moderate

TLDR

Free, offline image generator that turns text descriptions into pictures on your own computer, no accounts, no internet, no technical setup needed.

Mindmap

mindmap
  root((Fooocus))
    What it does
      Text to image
      Inpainting edits
      Outpainting extend
      Face swapping
    How it works
      SDXL model
      Prompt improvement
      Custom sampling
      PyTorch backend
    User experience
      Simple interface
      Midjourney-like feel
      Minimal parameters
      Style presets
    Use cases
      Quick art creation
      Local image editing
      Beginner friendly
      No subscription needed

Things people build with this

USE CASE 1

Generate artwork and illustrations from text prompts without paying for a subscription service.

USE CASE 2

Edit specific parts of images using inpainting, or extend images beyond their original borders with outpainting.

USE CASE 3

Create variations of photos or swap faces in images using built-in tools.

USE CASE 4

Run image generation entirely offline on your own GPU without needing internet or creating accounts.

Tech stack

PythonPyTorchStable Diffusion XLGradioGPT-2

Getting it running

Difficulty · moderate Time to first run · 30min

Requires downloading large model weights (several GB) and GPU/CUDA for reasonable performance; CPU-only is very slow.

Use it freely, but any project you distribute that includes this code must also be GPL-licensed and open source.

In plain English

Fooocus is a free, offline, open-source image generation tool that lets you create high-quality images from text descriptions. It is designed to give users the experience of a polished commercial service like Midjourney, but running entirely on your own computer with no accounts, no subscriptions, and no internet connection required. The central design philosophy is simplicity: instead of exposing dozens of technical parameters (like those found in tools such as Stable Diffusion WebUI or ComfyUI), Fooocus hides most of the complexity and focuses the user on just writing a prompt, a text description of the image they want. Under the hood it uses a Stable Diffusion XL (SDXL) model, which is a large neural network trained on billions of images to generate realistic and artistic pictures from text. Fooocus adds its own pre-processing pipeline (based on GPT-2, a language model) to automatically improve prompts, along with custom sampling algorithms that reliably produce high-quality results even with short or simple prompts. Beyond basic text-to-image generation, it supports inpainting (editing specific parts of an existing image), outpainting (extending an image beyond its original borders), image-to-image variations (generating alternatives based on an uploaded photo), face swapping, and style presets similar to Midjourney's style flags. You would use Fooocus if you want a quick and beginner-friendly way to generate images locally, without deep technical configuration. It requires a minimum of 4 GB of GPU memory on an Nvidia card. The tool is currently in limited maintenance mode (bug fixes only), as the underlying SDXL architecture it is based on has been largely superseded by newer models. The tech stack is Python, with the web interface built using Gradio (a Python library for building interactive ML demos), and the image generation backend running PyTorch.

Copy-paste prompts

Prompt 1
Set up Fooocus on my machine and generate an image from this prompt: 'a cozy cabin in the mountains at sunset, oil painting style'.
Prompt 2
Use Fooocus to inpaint a section of an existing image, replace the sky with a starry night scene.
Prompt 3
Generate 5 different artistic variations of a photo I uploaded using Fooocus's image-to-image feature.
Prompt 4
Configure Fooocus with a style preset similar to Midjourney and create a series of character portraits.
Prompt 5
Extend an image using Fooocus outpainting to add more landscape on the left and right sides.
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.