DEV Community

Cover image for Self-Hosting an AI Image Generator in 2026: Fooocus on Windows, Linux, Mac and Colab
Fooocus.app
Fooocus.app

Posted on

Self-Hosting an AI Image Generator in 2026: Fooocus on Windows, Linux, Mac and Colab

We run Fooocus.app, a browser-based image studio inspired by the open-source Fooocus — full disclosure before the tutorial. One identity note that prevents an expensive confusion, stated on our own site on every page: Fooocus.app is not the Fooocus software, doesn't run it, and isn't affiliated with it. The official Fooocus is a free, open-source project at github.com/lllyasviel/Fooocus, and that repository is the only official download source — the project's readme explicitly warns that search results are full of fake "Fooocus" sites, some charging money for free software. This guide is about the real, self-hosted software: what hardware genuinely runs it, the exact install steps per OS, the Colab path when you have no GPU, the documented error fixes, and the honest case for when you should skip the install entirely. Everything reflects the official readme and our own deployment-guide experience, as of late 2026.

Why self-host an image generator at all

Running image generation locally answers three real frustrations with hosted tools: monthly credit meters, content filters tuned for someone else's audience, and the inability to pin a seed and reproduce a result. The open-source Fooocus is one of the friendliest doors into that world — an SDXL-based generator built around "just type a prompt," with the deep controls (seed, sampler, guidance, LoRAs, a refiner pass, hundreds of style combinations) folded away until you want them.

The honest costs, stated as plainly:

  • Hardware. The minimum documented configuration is an Nvidia RTX card with 4 GB of VRAM plus 8 GB of system RAM with virtual memory swap enabled — and the readme's own performance table shows how steep the penalty gets below the target hardware.
  • Downloads. First launch fetches the preset SDXL model (gigabytes); first inpaint adds a 1.28 GB inpaint model.
  • Maintenance. You own the environment: drivers, Python, dependencies.
  • The big one: the project is in limited long-term support — bug fixes only. The readme itself points users toward WebUI Forge and ComfyUI for newer model families. Choosing Fooocus in 2026 means choosing a stable, friendly, aging tool, knowing that going in.

The hardware reality, before you touch a terminal

From the official readme's performance table (relative speed vs. an RTX 3000-series card):

Hardware Requirement Documented relative speed
Nvidia RTX 2000/3000/4000 4 GB VRAM + 8 GB RAM, swap required Baseline target
Nvidia GTX 1000 series 8 GB VRAM Only a little faster than a CPU
AMD on Windows (DirectML) 8 GB VRAM ~3× slower than RTX 3000
AMD on Linux (ROCm) 8 GB VRAM ~1.5× slower than RTX 3000
Mac, Apple silicon (M1/M2) Shared memory ~9× slower than RTX 3000
CPU only 32 GB RAM ~17× slower than RTX 3000

Documented generation speed by hardware, relative to an RTX 3000-series card

Two reads matter. A 4 GB RTX card is a genuinely workable entry point — the swap-enabled design targets exactly that. And a GTX 1000-series card, despite sporting 8 GB of VRAM, is documented as barely faster than a CPU: VRAM alone doesn't make a generation machine, architecture does. If your only hardware is a laptop iGPU or an old GTX card, the Colab path below — or a hosted studio — will serve you better than an install you'll resent.

Install on Windows

  1. Download from the official releases only. In the GitHub readme, use the "Click here to download" link, which points to Fooocus_win64_2-5-0.7z on the project's releases page. Not a mirror, not a site with a price tag — the software is free.
  2. Unzip the .7z with 7-Zip onto a drive with real free space (models plus swap need room). You get a Fooocus folder containing run.bat.
  3. Run run.bat. For the anime or realistic editions, run run_anime.bat or run_realistic.bat instead.
  4. Wait out the first launch. It downloads the preset's SDXL model into Fooocus\models\checkpoints, then opens the UI in your browser. Later launches skip the download and start in seconds.
  5. Expect the inpaint download. The first inpaint session fetches inpaint_v26.fooocus.patch (1.28 GB) into Fooocus\models\inpaint. It surprises people mid-session; it's normal.

Install on Linux

Clone the repository, build the pinned environment, start with updates:

git clone https://github.com/lllyasviel/Fooocus.git
cd Fooocus
conda env create -f environment.yaml
conda activate fooocus
pip install -r requirements_versions.txt
python entry_with_update.py
Enter fullscreen mode Exit fullscreen mode

A Python 3.10 venv works in place of conda. Two launch flags worth knowing: --listen exposes the UI to your network (the classic self-hosting pattern — run it on the GPU box, browse from a laptop), and --preset anime or --preset realistic switches editions at launch. AMD users get the best non-Nvidia story here: ROCm at roughly 1.5× slower than the RTX baseline is genuinely usable.

Install on Mac (Apple silicon)

On an M1/M2 Mac running macOS Catalina or later: install conda, install the PyTorch nightly build, then follow the same clone-and-run steps as Linux. The readme labels the Mac path an unofficial guideline, and the table says what to expect — about 9× slower, the price of shared unified memory. One documented tweak: some M2 users need --disable-offload-from-vram to run at all. A Mac is fine for casual generation; it is not a production machine.

The no-GPU path: Fooocus on Google Colab

If you have no capable GPU, the official notebook runs real Fooocus on Google's hardware — same interface, same SDXL models, nothing installed locally:

  1. Open the official notebook from the Colab badge in the GitHub readme (it links to fooocus_colab.ipynb in the official repo). Community notebooks circulate; start with the official one.
  2. Set a GPU runtime. Runtime → Change runtime type → T4 GPU. On a CPU runtime, the cell runs and images take absurdly long.
  3. Run the cell and wait. It clones Fooocus, installs dependencies, and downloads the default model (Juggernaut XL) — several minutes on first run — then starts the app with --share --always-high-vram.
  4. Open the printed gradio.live link in a new tab. That's the full Fooocus interface, running on Colab's GPU for the life of the session.
  5. Switch presets by flag, not in the UI. Add --preset anime (or --preset realistic) to the last line and re-run the cell; switching presets inside the interface can time out mid-download after 60 seconds.

The free tier's documented limits: the refiner runs off by default; heavy features like Image Prompt can disconnect the session (plain text-to-image is what's kept working); models re-download into every fresh session; outputs vanish with the session unless saved to Drive; and Colab ends idle sessions and caps free GPU time. Colab is for trying Fooocus properly — the real software, real controls — not for unattended production. Note also that the readme dates the notebook's last tested run at 12 August 2024; treat breakage as plausible and the GitHub issues page as your first stop.

Decision path: local install vs Colab vs hosted studio

Fixes for the errors everyone actually hits

All three are named in the readme:

  • RuntimeError: CPUAllocator — memory exhaustion. Enable virtual memory swap and keep at least 40 GB free on each involved drive. The single most common failure on 8 GB-RAM machines.
  • MetadataIncompleteBuffer / PytorchStreamReader errors — a corrupt model file, usually a bad download. Delete the checkpoint and let Fooocus re-download it.
  • An Nvidia card that used to be fast now crawls — the readme documents that some drivers newer than version 532 run about 10× slower than 531. Downgrade the driver before you blame the model.

And a fourth operational rule from the download section rather than the error list: if a "Fooocus download" site charges money or ships a strange installer, it's one of the fake sites the readme warns about. GitHub is the only official source; the download is the product.

Common mistakes

Buying hardware on VRAM alone. The 8 GB GTX 1000-series trap, again — architecture is the spec to shop: RTX 2000-series or better, ROCm Linux for AMD, Colab for nothing-local.

Skipping swap setup on 8 GB machines. "Swap required" is in the minimum spec because the CPUAllocator error is what happens when you ignore it.

Closing the terminal mid-first-launch. The multi-gigabyte model download happens once; killing it mid-stream is how corrupt-model errors happen later.

Treating a Mac or CPU-only box as production hardware. At 9× and 17× slower, they're experimentation machines — a frustrating way to learn the speed table the hard way.

Expecting hosted studios to pin seeds. If your workflow depends on reproducing an exact image — iterating one variable at a time, A/B-ing a prompt — that capability lives in the local software (seed, sampler, LoRAs). Hosted studios, ours included, generally re-roll every run by design; the studio path trades reproducibility for zero environment maintenance.

Assuming active development. LTS with bug fixes only; for newer model families, the readme's own pointers are WebUI Forge and ComfyUI.

When to skip the install

Self-hosting wins when you have the hardware, want every control, and value offline operation. It genuinely loses — not as marketing, but as arithmetic — when the machine is weak, the appetite for environment maintenance is low, or the need is occasional. That gap is the whole reason our browser studio exists: no download, no GPU required, per-job prices shown before running. If the deciding factor is control, self-host — the steps above are everything you need. If the deciding factor is effort, don't — pick any hosted path, including free ones like Colab, and spend the saved weekend on the actual images.

The habit that saves money in every path: before installing, buying, or signing up for anything, confirm you're on the official source. In self-hosting, the download is the product.

Top comments (0)