ComfyUI and FLUX locally, without the cloud

By Emmanuel Sauvage · Published · Updated

This page may contain Amazon affiliate links. A purchase after a click can earn the site a commission, at no extra cost to you. The advice stays independent. How affiliation works.

ComfyUI is an open-source interface for diffusion image generation. A single “prompt and button” screen is replaced by a workflow, a graph of connected nodes that loads the model, encodes the text, samples the image, and saves the file. A checkpoint is the trained diffusion network (the model weights). For FLUX, a recent text-to-image model family, you download checkpoints in a compatible format (often .safetensors) and put them in the folder ComfyUI expects. As long as you do not publish the interface on the internet without protection, your prompts and images stay on your machine. It pairs naturally with a text stack such as Ollama (a local large language model (LLM) engine) or the Docker stack for Ollama and Open WebUI. For family ideas (albums, room decor, costume art, with nothing sent to a cloud), see images without a cloud.

This guide is for a household that wants a clean ComfyUI install, a first FLUX workflow, and a plan for when the GPU will not cooperate.

Contents

Section Jump to
Overview and hardware Five steps · Hardware and software
Linux / Windows install Install table · PyTorch CUDA
Docker install Docker
First image test First FLUX workflow · UI labels
Home network LAN access
GPU blocks Troubleshooting, in order
FAQ (full text) Common questions

Five steps (overview)

  1. Check the hardware — an SSD for the checkpoints (SSD storage for models), and the FLUX VRAM ranges in the VRAM table.
  2. Install ComfyUI — a Python venv or Docker. The detailed sections are below.
  3. Install ComfyUI Manager (recommended) — the extension that adds custom nodes (extra modules).
  4. Download a FLUX checkpoint — read the license, then put the file in models/checkpoints/.
  5. Load a FLUX workflow — test at a modest resolution, then click Queue Prompt (see UI labels) for the first image.

Start here for your setup

Hardware and software before you start

VRAM (the graphics card’s own memory) is the first limit for FLUX on a home PC. Concrete ranges (resolution, fp16, quantized checkpoints, --lowvram) are collected in the VRAM table, the single reference for this guide. Cross-check GPU, iGPU, and eGPU if you are choosing a card or a mini PC.

Common FLUX checkpoints often run in fp16 (half-float, half-precision numbers that use less GPU memory than fp32).

On disk, a FLUX checkpoint is often several gigabytes. Add the VAE (variational autoencoder, the module that turns the model’s internal output into a visible image), any LoRA files (small adapters for a style or a character, so you do not re-download the whole checkpoint), and test images. An SSD set aside for model storage avoids long waits at load time.

Hardware and affiliate links (plainly stated) — If you are short on disk space or VRAM for FLUX, the searches 1 TB NVMe SSD on amazon.co.uk and RTX GPU (16 GB, as a rough size) on amazon.co.uk are catalog shortcuts (Amazon affiliate link — how affiliation works). LocAIhome may earn a commission, at no extra cost to you. Check M.2 and power-supply compatibility, and today’s price (a ballpark range as of October 2026). Before you buy, the hardware selector and choosing hardware for home AI size the whole machine (RAM, noise, and power draw: a mini PC left on all day).

Supported systems: Linux and Windows with NVIDIA and recent drivers are the best documented path. macOS on Apple Silicon works with Metal backends, and FLUX there is often slower or fussier than on an RTX. Python 3.10 or 3.11 is a good fit for the classic install.

ComfyUI labels, in plain English

ComfyUI shows most actions in English. Keep this table nearby during the first workflow.

Label in the app What it does
Load Checkpoint Load the main model file
CLIP Text Encode Encode the text prompt
KSampler Sample the image (the diffusion steps)
VAE Decode Turn the internal output into visible pixels
Save Image Write the image file
Load Load a workflow JSON (or drag and drop it)
Save Save the node graph
Queue Prompt Queue the job and start generation
Custom nodes Extra nodes (extensions, usually from Manager)
Checkpoint A .safetensors file in models/checkpoints/
LoRA A small style adapter (a file in models/loras/)

Model folders (know these before you install)

Put the files in place before the first launch if you can. Otherwise create the folders and restart ComfyUI.

Path under ComfyUI/ Typical contents
models/checkpoints/ FLUX and SDXL checkpoints (.safetensors)
models/loras/ LoRA files
models/vae/ A VAE, when the workflow asks for it separately
output/ Generated images (created automatically)

Copy and paste: use the text blocks below (one command per line). The URL and python -m copy as written.

ComfyUI Manager (before the first workflow)

After the first launch (python main.py, or the Docker container), install ComfyUI Manager from the interface (the Manager button, or the repository clone described in the community docs). It downloads missing custom nodes when an imported workflow shows red nodes. Without Manager you install those by hand, update extensions one by one, and debug JSON imports yourself. Do this before you import a complex FLUX workflow. The same answer is in Common questions (ComfyUI, FLUX, Manager) and at the end of the article.

Install with Python and a virtual environment (venv)

Official reference: the ComfyUI repository on GitHub and the Installing section.

Step Linux Windows What you should see
1 apt prerequisites Git, and Python on PATH A terminal that is ready
2 git clone, then cd The same (text block below) A ComfyUI/ folder
3 python3 -m venv, then source python -m venv, then Activate.ps1 A (venv) prompt
4 PyTorch CUDA (commands) The same python -c "import torch; print(torch.cuda.is_available())" prints True
5 pip install -r requirements.txt The same Dependencies installed
6 python main.py The same The UI at http://127.0.0.1:8188

PyTorch CUDA commands (copy and paste)

The PyTorch wheel changes with the OS, the CUDA version in your NVIDIA driver, and the date. Do not reuse a command you found at random on a forum.

  1. Open the official picker: pytorch.org/get-started/locally/ (Stable, Pip, your OS, and the CUDA version that matches nvidia-smi).
  2. Copy the entire pip install torch … line shown on the site.
  3. Paste it into the activated venv, run it, then continue with pip install -r requirements.txt (Linux or Windows).

Copy and paste: a text block with no syntax coloring. One command per line, and the URL stays intact (https://github.com/..., python -m venv).

Linux (Ubuntu and Debian-like)

  1. Install the system packages and a recent Python:
sudo apt update && sudo apt install -y git python3 python3-venv python3-pip
  1. Clone the repository and enter the folder:
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
  1. Create and activate a venv:
python3 -m venv venv
source venv/bin/activate
  1. Follow the PyTorch CUDA commands, then:
pip install -r requirements.txt
  1. Start the local server:
python main.py
  1. Open http://127.0.0.1:8188 in a browser on the same PC.
  2. Put your first FLUX checkpoint (a file the model license allows) in ComfyUI/models/checkpoints/.
  3. Restart ComfyUI if you need to, then load a FLUX workflow (next section).

Windows (native, outside WSL)

  1. Install Git for Windows and Python 3.10 or newer from python.org (check “Add to PATH”).
  2. Open PowerShell. Copy these as written: the text blocks below (so the HTML page does not alter https:// or python -m).
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
python -m venv venv
.\venv\Scripts\Activate.ps1
  1. Follow the PyTorch CUDA commands, then:
pip install -r requirements.txt
python main.py
  1. Open http://127.0.0.1:8188 in a browser on the same PC.
  2. Copy the FLUX checkpoint into ComfyUI\models\checkpoints\.
  3. Allow ComfyUI in the Windows firewall if a prompt appears (LAN access only if you stay on the home network — see network access).
  4. Try a minimal workflow (the “First FLUX workflow” section).

If you would rather isolate a Linux environment under Windows, Microsoft’s WSL2 docs plus NVIDIA GPU passthrough in WSL2 follow the Linux steps above. That helps when the Windows wheels misbehave.

Install with Docker

Docker fits when you want a repeatable stack beside Docker for Ollama and Open WebUI, without mixing Python dependencies on the host. If containers are new to you, read that Ollama and Open WebUI guide first, then come back here to mount the GPU and the models volume for ComfyUI.

  1. Docker Engine (Linux) or Docker Desktop (Windows or macOS), with GPU access if you have it.
  2. On Linux with NVIDIA: the NVIDIA Container Toolkit.
  3. A current community ComfyUI image (check the date and the volume paths).
  4. A host volume mapped to the container’s models folder (so you do not re-download checkpoints).
  5. Bind the port as 127.0.0.1:8188:8188 only. Example:
docker run --gpus all -p 127.0.0.1:8188:8188 \
  -v /path/to/models:/app/models \
  comfyui-image-name
  1. Keep the FLUX checkpoints on the host, then import the workflow in the UI. Check the container logs if CUDA is invisible.

Leave port 8188 off the public internet unless the service has authentication. This is not a family service that is ready for the open web.

First FLUX workflow

A ComfyUI workflow is a JSON file (often .json) that describes which nodes are connected. A typical chain is Load Checkpoint, then CLIP Text Encode, then KSampler, then VAE Decode, then Save Image (plain-language meanings: UI labels).

The usual path to a first image:

  1. Download or export a FLUX workflow that matches your checkpoint (ComfyUI communities and workflow repositories — check your ComfyUI version).
  2. In the interface, click Load (load the workflow JSON, or drag the file onto the canvas).
  3. In the loader node, select your listed FLUX checkpoint. If it is missing, the file is in the wrong folder or the name is off.
  4. Type a simple prompt (“bright Scandinavian living room, plants, morning light, realistic photo”).
  5. Set a modest resolution for the first test (768 or 1024, depending on the VRAM table).
  6. Click Queue Prompt and watch the progress. The image is also written to ComfyUI/output/ (the output folder at the root of the cloned repo — ComfyUI\output\ on Windows).
  7. Pick up the file from that folder, or from the preview node in the UI.
  8. Save the workflow once it works (Save) so you can reuse it.

If the graph shows missing nodes in red, open ComfyUI Manager and install the extensions it names, or start over from a minimal workflow shipped with the model.

To draft prompt variations without a cloud, a local LLM can write them through a private family assistant. Keep in mind that a text model can invent details.

VRAM, performance, and FLUX variants

Situation What to try
12 GB or more of NVIDIA VRAM FLUX dev in fp16, 1024×1024 — the “comfortable at home” range for this guide
8 GB of VRAM A lower resolution, batch size 1, low-VRAM options, quantized models
CPU only Possible for light Stable Diffusion tests. FLUX stays very slow, and it is a poor fit for daily use
System RAM 32 GB is a good idea if you offload. See 32 vs 64 GB of RAM

Watch nvidia-smi during a generation. If VRAM fills up before the image finishes, lower the resolution or use the flags documented in the ComfyUI README (--lowvram, and --novram only as a last resort). The hardware guide is VRAM and model size. A GPU that runs for a long time shows up on the household power bill: electricity for a home AI box.

Common GPU troubleshooting

Priority Symptom What to try
P0 CUDA not available, or torch.cuda.is_available() is False NVIDIA drivers are too old, or PyTorch was built without CUDA. Use a wheel from pytorch.org that matches the driver, and reboot after the update.
P0 Out of memory (OOM) Close games and a heavy browser. Lower the resolution. Try --lowvram. Use a lighter checkpoint.
P1 ComfyUI does not list the checkpoint The file is missing from models/checkpoints/, or the extension is wrong. Use .safetensors and keep stray spaces out of the file name.
P1 Red nodes after a workflow import Open ComfyUI Manager and install the missing custom nodes.
P2 A black screen or a noisy image The checkpoint and the workflow do not match, or the VAE is missing. Start again from a workflow known to work with that checkpoint.
P2 Slow on a laptop Plug into wall power and use a Windows performance power plan. Compare a mini PC comparison if you want a dedicated machine.
P2 Access from another device on the LAN See the network diagram. Use --listen 0.0.0.0 only if you understand the risk. For personal images, see privacy when AI stays home.

ComfyUI on the home network

By default, python main.py listens only on localhost (127.0.0.1:8188). Only the PC running ComfyUI can open the interface. If you start it with --listen 0.0.0.0, any device on the LAN (local area network, home Wi-Fi or Ethernet) can try port 8188. That is handy for a tablet, and risky without a firewall or a password.

[ComfyUI PC :8188] ◄── Wi-Fi / Ethernet ──► [Router] ◄──► [Household phone / tablet]
        │                                              │
   127.0.0.1 only                             No port forward
   (recommended)                              of 8188 to the internet without a VPN
        │
   --listen 0.0.0.0  →  listens on every LAN interface

Caption: by default, ComfyUI listens only on localhost (127.0.0.1), so only the host PC opens the interface. With --listen 0.0.0.0, other devices on the LAN (Wi-Fi or Ethernet) can try port 8188. Without a manual forward on the router, the port usually stays invisible from the internet.

Mode Behavior Who can open the UI? Main risk
Local (recommended) python main.py without --listen Only the PC running ComfyUI Low on a personal computer
LAN open python main.py --listen 0.0.0.0 Any machine on the home network The UI often has no password

A sound habit: stay local on the computer that generates the images. To share a picture, copy it from ComfyUI/output/ or from a sync folder you chose, instead of exposing the UI to the whole network. Before images of other people or of minors: privacy when AI stays fully local.

ComfyUI in a home setup

  • Text and images: Ollama or Open WebUI for chat, ComfyUI for pictures. You do not need to merge everything into one container.
  • Another GUI for text models: LM Studio if you want to try text models without touching ComfyUI.
  • First time with local AI: a first local AI in 15 minutes if ComfyUI is your second piece, after text.

Common questions (ComfyUI, FLUX, Manager)

The answers below repeat the Common questions block at the end of the article (the same content, readable without opening the accordions).

How much VRAM does FLUX need in ComfyUI?

It depends on the checkpoint (dev or quantized), the resolution, and fp16. Use the VRAM table in this guide and the VRAM and model size guide. There is no single number for every household.

ComfyUI or a simpler interface?

ComfyUI takes longer to learn, and the node graph gives you fine control. It fits when you want to reuse workflows and stay fully on your own machine.

Where do the model files go on disk?

Put the main checkpoints in ComfyUI/models/checkpoints. Use a fast SSD and leave several dozen gigabytes free.

Do I need ComfyUI Manager?

You can skip it. Manager is still the practical way to install custom nodes without the command line, update extensions, and fix red nodes after you import a FLUX workflow.

Can I use Stable Diffusion instead of FLUX?

Yes. ComfyUI supports many SDXL and SD1.5 checkpoints, with different workflows. FLUX is aimed at recent text-to-image quality. Stable Diffusion still has a large library of LoRA files (small adapters for the model) and tutorials.

Does ComfyUI replace Midjourney or DALL·E?

For a hobbyist who will manage a GPU and workflows, yes on control and privacy. The learning curve is steeper than the cloud apps.

Conclusion

Install ComfyUI with a venv when you want close control of CUDA and updates, or with Docker when you want several home AI services to follow the same pattern. Decide once where your checkpoints live, keep one working FLUX workflow on disk, and size the VRAM with VRAM and model size before you give up on local generation. Your images stay at home, in line with images without a cloud.

Common questions

How much VRAM does FLUX need in ComfyUI?

It depends on the checkpoint (dev or quantized), the resolution, and fp16. Use the VRAM table in this guide and the VRAM and model size guide. There is no single number for every household.

ComfyUI or a simpler interface?

ComfyUI takes longer to learn, and the node graph gives you fine control. It fits when you want to reuse workflows and stay fully on your own machine.

Where do the model files go on disk?

Put the main checkpoints in ComfyUI/models/checkpoints. Use a fast SSD and leave several dozen gigabytes free.

Do I need ComfyUI Manager?

You can skip it. Manager is still the practical way to install custom nodes without the command line, update extensions, and fix red nodes after you import a FLUX workflow.

Can I use Stable Diffusion instead of FLUX?

Yes. ComfyUI supports many SDXL and SD1.5 checkpoints, with different workflows. FLUX is aimed at recent text-to-image quality. Stable Diffusion still has a large library of LoRA files (small adapters for the model) and tutorials.

Does ComfyUI replace Midjourney or DALL·E?

For a hobbyist who will manage a GPU and workflows, yes on control and privacy. The learning curve is steeper than the cloud apps.

Sources

Narrow it down with the hardware selector · French version of this section