Last updated: 21 September 2026
Reviewed for September 2026; current-generation picks and related guides linked below.
FLUX has become one of the default open-weight image models of 2026, but most people still meet it through someone else’s API, someone else’s rate limits, and someone else’s content filters. Running FLUX locally through ComfyUI removes all three. Once the setup is done, generation costs nothing beyond electricity, and every node in the pipeline is yours to rewire.
This ComfyUI tutorial walks through the full path: checking your GPU, installing ComfyUI, downloading the right FLUX checkpoint for your hardware, wiring up your first workflow, and automating generation with a Python script. Thirteen steps, about 90 minutes total, and most of that time is spent waiting on model downloads rather than typing commands.
By the end you will have a working local FLUX pipeline: a configured ComfyUI install, a downloaded model matched to your GPU, a saved workflow, and a script that can queue new generations without touching the browser. If you have already worked through a local LLM tutorial with Ollama or vLLM, the pattern here will feel familiar: download weights, load them into a runtime, send requests, read the output. The image side of local AI just adds a few more moving parts, since a diffusion pipeline needs a VAE and text encoders alongside the model itself, not just a single checkpoint.
None of this requires a background in machine learning. It requires patience with file paths, a GPU with enough headroom, and a willingness to read error messages instead of guessing. Every command in this guide is copy-pasteable, and every pitfall listed further down was picked because it’s the kind of mistake that looks like a broken install but is actually a five-minute fix once you know what to look for.
Don't miss new tech stories on Google
Add Tech Insider once in the Google app and our stories appear in your news suggestions.
What Is ComfyUI, and Why Run FLUX Locally?
ComfyUI is an open-source, node-based interface for running diffusion image models. Instead of a single text box and a generate button, you build a visual graph: a model loader feeds a text encoder, the text encoder feeds a sampler, the sampler feeds a VAE decoder, and the decoder writes out a finished image. Every one of those stages is a swappable node, which is exactly why the project (hosted at github.com/comfyanonymous/ComfyUI) became the preferred backend for power users, LoRA trainers, and anyone building an automated image pipeline. That popularity isn’t anecdotal: ComfyUI Ecosystem Analysis put active monthly users at 4,000,000 as of August 2025, and the project has kept shipping fast enough since then to hold onto that audience, with the Comfy-Org GitHub repository showing ComfyUI core reaching v0.37.0 across 156 releases on September 21, 2026, just six days after v0.36.0 landed, an update that pulled native Qwen-Image 2.1 support with three official templates and MoGe 3 geometry estimation straight into core, and the companion Comfy-Org/ComfyUI_frontend repository reaching v1.55.9 on September 14, 2026, keeping new releases landing on a roughly weekly cadence through the back half of 2026.
That graph-based design is also what makes ComfyUI intimidating the first time you open it. A blank or half-populated canvas full of small boxes and connecting lines looks like nothing else in consumer software. The payoff for that learning curve is real, though: nothing is hidden behind a settings menu. If you want to see exactly what resolution, sampler, seed, and guidance value produced an image, it’s sitting right there on the canvas, and you can save the entire graph as a JSON file that reproduces the exact same pipeline on a different machine.
FLUX is the model family built by Black Forest Labs, a team founded by researchers who previously worked on Stable Diffusion. FLUX.1 launched with two open-weight variants, Dev and Schnell, plus a hosted Pro tier. FLUX.2 followed in 2026 and added the Klein family alongside Dev, Pro, and Flex tiers, including the 4B Klein model that ThunderCompute’s January 2026 rundown flagged as the best pick for fast iteration on consumer GPUs inside ComfyUI workflows, with native support inside ComfyUI confirmed in NVIDIA’s own 2026 developer coverage of the release (NVIDIA RTX AI Garage blog). ComfyUI itself has kept pace on the node side too: version 0.29.0, recorded by Wikidata as an official release entry dated July 29, 2026, added dedicated JoyImageEdit and HeyGen nodes, according to Creative AI News, and that cadence has only accelerated since, with AI/TLDR reporting that version 0.35.0 added nodes for five separate LLM and image APIs on September 9, 2026, extending the same graph-based workflow model to editing and avatar-generation use cases well beyond static text-to-image. Black Forest Labs documents the full lineup and its release notes directly on its own blog (bfl.ai/blog/flux-2), and Wikipedia keeps a running summary of the model family’s history and technical background (Flux (text-to-image model)).
Running FLUX inside ComfyUI instead of a hosted API buys you four things: no per-image cost after setup, no content filter deciding what you’re allowed to render, full access to LoRA and ControlNet-style extensions, and complete control over batching and automation. It also buys you a license to read carefully, since several FLUX weights are restricted to non-commercial use. We’ll cover exactly which ones later in this ComfyUI tutorial. For a wider view of where FLUX sits against the rest of the field, see our roundup of the leading AI models of 2026, which covers the broader mix of text, code, and image models shaping the year.
Prerequisites: Hardware, Software, and Versions You Need
Gather these before you start. None of them are exotic, but skipping one is the single biggest reason ComfyUI installs stall halfway through, usually with a wall of red text that looks worse than the actual fix.
Software Checklist
- Windows 10/11, Linux (Ubuntu 22.04 or newer), or macOS on Apple Silicon
- Python 3.10 or newer, matching ComfyUI’s documented setup requirements
- Git, for cloning the ComfyUI repository and installing custom nodes
- An up-to-date NVIDIA driver with CUDA 12.x support (NVIDIA GPUs only)
- A CUDA-enabled build of PyTorch, installed via the official selector at pytorch.org
- A free Hugging Face account, required to accept the gated license on FLUX.1 Dev and FLUX.2 Dev before you can download them
Hardware Checklist
Budget at least 40-50GB of free disk space for a ComfyUI install plus one FLUX checkpoint, its VAE, and its text encoders. Keep two or three model variants around and that number climbs past 100GB fast, especially once you start collecting LoRAs and alternate quantizations for comparison. On the GPU side, most current guides converge on a 12GB VRAM floor to run FLUX in ComfyUI at all, with 24GB or more recommended for a comfortable experience at higher resolutions and batch sizes. If you’re shopping for a card specifically for this kind of local AI workload, our comparisons of the RTX 5070 vs RTX 5070 Ti and the Nvidia DGX Spark vs Mac Studio both cover the VRAM-per-dollar tradeoffs in more detail. For a sense of how that floor compares against other local generation models, an August 2026 ThunderCompute tutorial found Wan 2.2’s 5B model runs on as little as 8GB of VRAM in ComfyUI through native offloading, while the larger 14B variant needs 16-24GB of VRAM for 480p output and 24GB or more to comfortably reach 720p.
| GPU VRAM | Practical FLUX options | ComfyUI experience | Example cards |
|---|---|---|---|
| 8GB | FLUX.1 Schnell or FLUX.2 Klein 4B, fp8/quantized | Workable with model offload enabled | RTX 3070, RTX 4060 |
| 12GB | FLUX.1 Dev or FLUX.2 Dev, fp8/quantized | Practical minimum for the Dev tier | RTX 3060 12GB, RTX 4070 |
| 16GB | FLUX.1/FLUX.2 Dev at fp16 with light offload | Comfortable for single-image workflows | RTX 4080, RTX 5070 |
| 24GB+ | FLUX.2 Dev, multiple stacked LoRAs, larger batches | Full comfort, minimal offload needed | RTX 4090, RTX 5090 |
Treat that table as practical, community-tested guidance rather than an official spec sheet from Black Forest Labs. Exact VRAM headroom depends on resolution, batch size, and which quantization format you load. A laptop GPU with 8GB will behave differently from a desktop card with the same number on the box, since desktop cards typically run higher power limits and cool more aggressively under sustained load.
Time Budget
Plan for roughly 90 minutes end to end, but the split is lopsided. Installing ComfyUI itself, Steps 2 through 5, usually takes 15-20 minutes on a normal broadband connection. Downloading a FLUX checkpoint, its VAE, and its text encoders, Steps 6 and 7, is the part that actually eats the clock, since those files run from a few gigabytes up into the twenties depending on which variant and precision you choose. Everything after that, from folder setup through your first generated image, is closer to 20-30 minutes of hands-on work. If your connection is slow, start the model download in Step 6 first and use the wait time to work through Steps 2 through 5 in parallel.
Step 1: Confirm Your GPU Meets FLUX’s VRAM Requirements
Before installing anything, check exactly how much VRAM your card reports and which driver version is active. On an NVIDIA system, run:
nvidia-smi --query-gpu=name,memory.total,memory.used,driver_version --format=csv
A healthy response looks like this, with your own GPU name and driver version in place of the example below:
name, memory.total [MiB], memory.used [MiB], driver_version
NVIDIA GeForce RTX 4070, 12282 MiB, 412 MiB, 550.120
Match the reported memory.total figure against the VRAM table above to pick a realistic starting model. If the command isn’t recognized at all, your NVIDIA driver either isn’t installed or doesn’t include the command-line tools, and that’s worth fixing before you go any further, since ComfyUI depends on the same driver stack to talk to your GPU.
If you’re on Apple Silicon, ComfyUI runs through the MPS backend instead of CUDA. It works, but expect noticeably slower generation than an equivalent NVIDIA card, and stick to the smaller FLUX Schnell or Klein variants for practical iteration speed. AMD GPUs on Linux can run ComfyUI through ROCm, though driver support and node compatibility trail NVIDIA’s CUDA ecosystem, and some newer custom nodes assume CUDA is available without checking first. If you want a deeper hardware gut-check before committing GPU time to this project, our GPU and CPU stress-testing guide is a reasonable detour to confirm your card is stable under sustained load before you rely on it for an hour-long download-and-generate session.
Step 2: Install Python, Git, and Your GPU Drivers
With hardware confirmed, verify your software stack is actually in place rather than assuming it. Open a terminal and run:
python3 --version
git --version
nvidia-smi
If Python reports anything older than 3.10, install a current version before continuing. A September 7, 2026 setup guide from the Sam Austin AI blog goes a step further and recommends pinning the exact point release, 3.10.6, rather than just any 3.10.x build, since older interpreters trigger dependency resolution errors partway through the ComfyUI install, usually on one of the image-processing packages, and the error message rarely mentions Python’s version as the actual cause. If git isn’t found, install it from your package manager on Linux, Xcode Command Line Tools on macOS, or git-scm.com on Windows.
Finally, install a CUDA-matched build of PyTorch using the official selector tool at pytorch.org rather than a generic pip install torch, which can silently install a CPU-only build and leave your GPU untouched. This is the single most common reason someone finishes a ComfyUI install, launches it successfully, and then finds every generation takes ten minutes instead of ten seconds. The PyTorch website’s selector asks for your OS, package manager, and CUDA version, then hands you the exact install command to paste, which removes the guesswork entirely.
Using a virtual environment, shown in the next step, rather than installing packages system-wide also matters more than it might seem. ComfyUI, its custom nodes, and any other Python project on your machine all want slightly different package versions, and letting them collide in one global Python install is how a working setup quietly breaks three weeks later when you install something unrelated.
Step 3: Clone and Install ComfyUI
With prerequisites confirmed, pull down the ComfyUI source and set up an isolated environment for it:
git clone https://github.com/comfyanonymous/ComfyUI.git
cd ComfyUI
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
On Windows, activate the virtual environment with venv\Scripts\activate instead of the source command. The pip install step pulls in dozens of dependencies and can take several minutes on a fresh machine, which is normal. If it fails partway through, scroll up in the terminal output rather than just re-running the command. The actual failing package is almost always named a few lines above the final error message.
If you’d rather skip the manual Python setup entirely, a portable Windows build of ComfyUI is also available directly from the project, bundling Python and dependencies into a single extractable folder; YanWenKun’s GitHub releases page shows that build reaching v11.0 on August 7, 2026. It’s a reasonable shortcut if you just want to run FLUX locally without managing environments by hand, though it makes updating individual packages more awkward later, since everything lives inside one self-contained folder rather than a system you can manage with normal pip commands. For a first install, that tradeoff is usually worth it. For a machine you plan to keep tinkering with over months, the git-clone-plus-venv route pays off.
Step 4: Launch ComfyUI for the First Time
Start the server from inside the ComfyUI folder, with the virtual environment still active:
python main.py
A working launch prints a short startup log ending in a local URL:
Starting server
To see the GUI go to: http://127.0.0.1:8188
Open that address in a browser and you should see ComfyUI’s default node graph, usually a simple text-to-image chain built for Stable Diffusion rather than FLUX. That’s expected. You’ll swap in a FLUX-specific workflow in Step 9, so don’t worry yet if the default graph doesn’t reference FLUX at all.
If you need ComfyUI reachable from another device on your network, say a laptop generating images while the actual GPU sits in a desktop elsewhere in the house, launch it with python main.py --listen 0.0.0.0 instead. Treat that option carefully on shared or public networks, since it removes the default localhost-only restriction and makes the interface reachable to anything else on the same network.
Step 5: Install ComfyUI Manager for Custom Nodes
ComfyUI Manager is the extension that makes everything downstream easier. It detects missing custom nodes when you load a community workflow and installs them for you, it can fetch models directly instead of you hunting down URLs by hand, and it can snapshot your current set of installed nodes so you can roll back if an update breaks something. Stop the server (Ctrl+C) and install it into the custom_nodes folder:
cd custom_nodes
git clone https://github.com/ltdrdata/ComfyUI-Manager.git
cd ..
python main.py
After ComfyUI restarts, a Manager button appears in the interface, usually in a corner of the screen or in a side menu depending on which ComfyUI version you’re on. Keep it updated. That matters more than it used to, since ComfyUI’s release cadence has picked up through 2026: version 0.27.0 added int8 model support on June 30, 2026, according to Earngenix Tutorials, version 0.28.0 followed with SeedVR2 and NVIDIA PID 1.5 support on July 15, 2026, per ComfyUI WikiNews, and version 0.25.0 shipped Depth Anything 3 and Kling V3-Turbo nodes in June 2026, per Creative AI News, all of which need a current Manager install to resolve their dependencies cleanly. Third-party node integrations have scaled right alongside the core project, too: Floyo AI’s own release notes describe bundling more than 300 custom ComfyUI nodes on top of core version 0.26.0 by July 17, 2026. A stale Manager install is one of the more common sources of custom node conflicts once you start adding FLUX-specific workflow packs, which we’ll cover in the troubleshooting section below. Most people install Manager once and forget it exists until something breaks, so it’s worth building a habit of checking for updates every few weeks rather than only when a workflow refuses to load.
Step 6: Choose the Right FLUX Model for Your Hardware
This is the step that determines whether the rest of this ComfyUI tutorial takes 90 minutes or four hours, because FLUX checkpoints range from a few gigabytes to well over twenty. Match your pick to the VRAM table from the prerequisites section, not to whichever variant looks most impressive in a demo video.
| Model | Weights | License | Best for |
|---|---|---|---|
| FLUX.1 Schnell | Open, downloadable | Apache 2.0 | Fast local iteration, lower VRAM, unrestricted commercial use |
| FLUX.1 Dev | Open, gated on Hugging Face | Non-commercial | Higher-quality local generation for research and personal projects |
| FLUX.2 Dev | Open, gated on Hugging Face | Non-commercial | The newest local quality tier, with native ComfyUI support |
| FLUX.2 Klein 4B | Open, downloadable | Apache 2.0 (family) | Compact, edge-friendly local runs on lower VRAM |
| FLUX.2 Pro / Flex | Hosted only, no local weights | Proprietary API | Highest quality, no GPU required, pay-per-use |
Two things to double-check before you rely on this table for a commercial project. First, FLUX.2 Klein’s 9B variant has license terms that differ by source, so read the current model card on Hugging Face before shipping anything built on it commercially. Second, both Dev-tier models are gated. You need to be logged into Hugging Face and have accepted the license on the model’s page before the download link will actually work, and that acceptance step trips up more first-time users than any other part of this process. Black Forest Labs maintains the canonical model list and license terms on its own blog, and Hugging Face hosts the official black-forest-labs organization page where every checkpoint lives.
For a first run, FLUX.1 Schnell is the easiest starting point. It’s unrestricted, open-weight, and built specifically for fast few-step generation, so you can confirm your whole pipeline works before committing a larger download to FLUX.1 Dev or FLUX.2 Dev. Think of Schnell as the version that proves your ComfyUI install, your folder structure, and your workflow graph are all correct, before you spend twenty or more gigabytes of bandwidth on a heavier model. Once Schnell produces a clean image, swapping the checkpoint loader over to Dev is a five-minute change, not a from-scratch setup.
Step 7: Download the Matching VAE and Text Encoder Files
Unlike a single-file Stable Diffusion checkpoint, FLUX splits into three separate pieces: the diffusion model itself, a VAE for decoding latents into pixels, and two text encoders, a CLIP-L model and a T5-XXL model, that together turn your prompt into conditioning. All three have to come from the same FLUX release, or generation quietly breaks in ways that are hard to diagnose later, since a mismatched file often loads without any error at all and just produces garbled output.
The two-encoder design is part of why FLUX handles prompts more reliably than older single-encoder models. CLIP-L is fast and good at short, punchy descriptors. T5-XXL is slower but reads long, structured sentences far more accurately, which is a big part of why FLUX tends to follow detailed, multi-clause prompts better than SDXL-era models did. You don’t need to understand the internals to use this well. You just need both files present and correctly wired, which the default FLUX workflow template handles for you.
Download the VAE file, commonly named ae.safetensors, and both text encoder files from the same Hugging Face repository as your chosen checkpoint. If your GPU sits at the lower end of the VRAM table, grab the fp8 version of the T5-XXL encoder instead of the full-precision one. It’s noticeably smaller, and the quality difference is minor compared to the VRAM it saves, especially if you’re already running the Schnell or Klein 4B checkpoint rather than a full-precision Dev model.
Step 8: Organize Your ComfyUI Model Folders
ComfyUI finds models by folder convention, so file placement matters as much as the download itself. From your ComfyUI root directory, the layout looks like this:
ComfyUI/
models/
diffusion_models/
flux1-dev.safetensors
vae/
ae.safetensors
clip/
clip_l.safetensors
t5xxl_fp8_e4m3fn.safetensors
loras/
(empty for now)
Restart ComfyUI after adding files so it rescans the models directory. If a file you just added doesn’t show up in a loader node’s dropdown, that restart step is almost always the missing piece, and it’s easy to forget after you’ve been moving files around for a few minutes.
If you keep models on a separate drive, or you’re sharing one model library across ComfyUI and another tool like Automatic1111, you don’t have to duplicate files. ComfyUI reads an extra_model_paths.yaml file in its root directory, which lets you point it at additional folders anywhere on disk. That’s worth setting up early if you already have a Stable Diffusion model collection sitting somewhere, rather than discovering it after you’ve copied twenty gigabytes of files you didn’t need to duplicate.
Step 9: Load a FLUX Workflow Template
You don’t need to build a node graph from scratch. ComfyUI Manager includes a workflow template browser with ready-made FLUX graphs, and Comfy Org also publishes example workflows you can drag straight onto the canvas as a JSON file. That template library keeps growing well beyond FLUX itself, too: ComfyUI.org documented the addition of Google Gemma 4 and VOID model workflows in May 2026, and Lightricks followed in August 2026 with LTX-2.5, a 22B-parameter open video model with native 4K HDR output and its own ready-made ComfyUI templates, a sign of how far the same node-based template system now reaches past image generation alone. Either route gives you the same core chain: a UNET or checkpoint loader feeds the diffusion model into a sampler, a DualCLIPLoader feeds your two text encoders into a CLIP Text Encode node for the prompt, an Empty Latent Image node sets your resolution, the KSampler node does the actual diffusion, and a VAE Decode plus Save Image node turns the result into a file on disk.
Reading that graph left to right is the fastest way to understand what’s actually happening. Data flows from loaders on the left, through conditioning and sampling in the middle, to decoding and saving on the right. Once that mental model clicks, modifying someone else’s workflow, instead of just running it as-is, stops feeling intimidating. Swapping a sampler node, adding a LoRA loader, or inserting an upscaler is just a matter of splicing one more box into a chain you already understand.
Load the basic FLUX text-to-image template first before touching anything more advanced. Confirm every loader node points at the files you placed in Step 8. A red-bordered node in ComfyUI almost always means it can’t find the file it’s configured to load, and clicking into that node’s dropdown to reselect the correct file usually clears it immediately.
Step 10: Configure Your First Prompt and Sampler Settings
FLUX responds better to plain descriptive sentences than to the comma-separated tag lists that worked well on older Stable Diffusion models. Instead of “fox, snow, cinematic, 8k, trending,” write something closer to “a red fox sitting in fresh snow at dusk, soft blue light, shallow depth of field.” Describe a scene the way you’d describe it to another person, not the way you’d tag a stock photo.
For sampler settings, a commonly recommended starting point in the ComfyUI community is the Euler sampler with a simple scheduler, a low guidance value around 3.5 rather than the 7-12 range typical of older SDXL workflows, and roughly 20-30 steps for FLUX.1/FLUX.2 Dev. FLUX.1 Schnell is distilled specifically for speed and needs far fewer steps, often as few as one to four. If your first generation looks noisy or unfinished on Schnell, cutting your step count down rather than up is usually the fix, which feels backwards if you’re used to more steps always meaning more detail.
Resolution is worth setting deliberately rather than leaving at whatever the template shipped with. FLUX generally handles resolutions around 1024×1024, or other combinations totaling a similar pixel count such as 1216×832 for a wider frame, more reliably than very small or very large canvases. Going well beyond that native range can produce duplicated subjects or warped anatomy, the same failure mode older diffusion models showed when pushed past their trained resolution. If you need a larger final image, generate at a native-friendly resolution first and upscale afterward rather than forcing a huge canvas on the first pass.
Treat all of these as sensible defaults to start from, not fixed rules. Every prompt responds a little differently, and the fastest way to learn FLUX’s behavior is generating four or five variations of the same prompt with small setting changes rather than reading about it.
Step 11: Generate Your First FLUX Image
Click Queue Prompt in the ComfyUI interface and watch your terminal. A healthy run looks something like this:
got prompt
model_type FLUX
loading in lowvram mode, current free VRAM: 7421 MB
100%|##########| 20/20 [00:18<00:00, 1.10it/s]
Prompt executed in 19.84 seconds
Generation speed varies widely by GPU, resolution, and which quantization you loaded, but expect somewhere in the range of a few seconds to a little over a minute per 1024×1024 image on a modern consumer card. The finished PNG lands in ComfyUI’s output folder, and a thumbnail appears directly on the Save Image node in the browser.
Look at that first image critically rather than just confirming something rendered. Check whether the prompt’s main subject is actually recognizable, whether hands and faces look coherent if any appear in frame, and whether the overall composition matches what you described. A slightly odd first result is normal and usually a settings issue rather than a broken install. A completely black, gray, or static-filled image points to a specific and fixable problem covered in the troubleshooting table below, not a sign that something is fundamentally wrong with your setup.
Step 12: Add a LoRA for Style or Character Consistency
A LoRA is a small adapter file, usually well under a gigabyte, that nudges a base model toward a specific style, character, or subject without retraining the whole checkpoint. Drop a FLUX-compatible LoRA file into models/loras/, restart ComfyUI, then insert a LoraLoader node between your model loader and the KSampler, and a matching LoRA-aware CLIP connection on the text encoding side.
Start with a LoRA strength around 0.8-1.0 and adjust from there. Pushing strength too high tends to overpower the base prompt and produce distorted results, while too low barely changes the output at all. Stack multiple LoRAs by chaining additional LoraLoader nodes, but keep in mind that combined strengths above roughly 1.5-2.0 total start fighting each other rather than blending cleanly, producing muddy or over-processed results instead of the combined effect you’re after.
LoRAs for FLUX are widely shared across community model hubs, covering everything from specific art styles to consistent fictional characters to product photography looks. Quality and licensing both vary by file and by uploader, so treat a downloaded LoRA the same way you’d treat any other third-party asset: check what license the creator attached before using the output commercially, and test on a few prompts before trusting it inside a larger workflow. Training your own LoRA is also possible, using a small set of reference images and one of several community training scripts built for the FLUX architecture, though that’s a project of its own well beyond a first ComfyUI tutorial. Adapter and open-weight support isn’t limited to LoRAs, either: ComfyUI Wiki reported that MiniMax’s H3 FL2VA and Ref2VA open weights picked up six official ComfyUI templates on August 3, 2026, part of a broader H3 rollout that QWE.edu.pl pegged at a 33.1B-parameter omni transformer, H3-Base, requiring ComfyUI 0.30.0 or newer, with text- and image-to-video workflows pulling down 42.47GB of model files on their own and up to 63.44GB once Ref2VA is added, which is worth knowing if your workflow is heading toward video or reference-driven generation rather than static LoRA styling alone.
Step 13: Save Your Workflow and Automate It With the ComfyUI API
This is the step that turns a one-off experiment into a reusable project. Save your working graph from the ComfyUI menu, then export it a second time in API format (Workflow menu > Export (API)). That API-format JSON is what you’ll feed to a script instead of the browser.
import json
import urllib.request
def queue_prompt(prompt_workflow):
data = json.dumps({"prompt": prompt_workflow}).encode("utf-8")
req = urllib.request.Request("http://127.0.0.1:8188/prompt", data=data)
return json.loads(urllib.request.urlopen(req).read())
with open("flux_workflow_api.json") as f:
workflow = json.load(f)
# Node "6" is the positive CLIP Text Encode node in the default FLUX template
workflow["6"]["inputs"]["text"] = "a red fox sitting in snow, cinematic lighting"
result = queue_prompt(workflow)
print(result)
Run that script with ComfyUI already running in the background and it queues a new generation without opening a browser tab. The node numbers in the exported JSON are specific to your saved workflow, so open the file once in a text editor to confirm which node ID holds your positive prompt text before wiring up a script against it.
From here the automation options branch out quickly. Swap the hardcoded prompt string for a loop over a list of prompts read from a CSV file, and you have a batch generator for a product catalog or a set of marketing variants. Wire the script into a scheduled job, and you have unattended overnight generation runs. Point it at a webhook, and a Slack command or a form submission can trigger a new image without anyone opening ComfyUI at all. Any of those turns this from a one-off experiment into a complete, working, locally hosted FLUX image generator that costs nothing per image beyond electricity and the GPU time you already own.
Reading a ComfyUI Node Graph Like a Pipeline, Not a Diagram
Once your first FLUX image is generating reliably, it’s worth spending ten minutes actually understanding the graph you’ve been clicking through, since almost every customization from here on is just inserting, removing, or rewiring a node in a chain you already have working.
Think of the graph as a pipeline rather than a flowchart. Each node is a function: it takes typed inputs, does one job, and passes typed outputs to whatever’s connected next. A checkpoint or UNET loader’s only job is reading a model file off disk and exposing it as a MODEL output. A CLIP Text Encode node’s only job is turning a string of text into a CONDITIONING output the sampler can use. The KSampler’s only job is running the actual diffusion steps, combining a model, conditioning, and a starting latent into a finished latent. Nothing in that chain knows or cares what happens before or after it, which is exactly what makes the graph so easy to modify safely.
That modularity is why adding a LoRA in Step 12 was just inserting one box into an existing line, rather than rebuilding anything. It’s the same reason ControlNet-style guidance, upscaling passes, and image-to-image workflows all bolt onto the same basic chain instead of requiring a separate tool. Once you can look at an unfamiliar community workflow and mentally trace the path from loaders on the left to Save Image on the right, you can adapt almost any shared FLUX workflow to your own hardware and prompt, rather than only ever running templates exactly as downloaded.
Batch Generation and Image-to-Image With FLUX
Text-to-image is the starting point, but two closely related workflows are worth setting up once your base pipeline is stable, since both reuse nodes you’ve already configured.
Batch generation means producing several variations of one prompt in a single queued run instead of clicking Queue Prompt repeatedly. Increase the batch_size value on the Empty Latent Image node, and the same sampler and prompt run multiple times with different random seeds, giving you a grid of options to pick from instead of a single result you either accept or regenerate from scratch. This is the fastest way to learn how sensitive a given prompt is to randomness, and it’s a natural companion to the automation script from Step 13 for anyone generating options at scale rather than one image at a time.
Image-to-image, sometimes shortened to img2img, starts from an existing picture instead of pure noise. Swap the Empty Latent Image node for a Load Image node feeding into a VAE Encode node, then feed that encoded latent into the same KSampler you’re already using, with a denoise value below 1.0 so the sampler preserves some of the original image’s structure instead of replacing it entirely. A denoise value around 0.5-0.7 is a reasonable starting point for restyling an existing image while keeping its composition recognizable, while lower values make smaller, more conservative changes. This is the same underlying chain from Step 9, just rerouted at the front, which is a good first exercise in treating the node graph as something you edit rather than something you only load.
Common Pitfalls When Running FLUX in ComfyUI
These account for the large majority of “it’s not working” reports from people learning ComfyUI for the first time.
- Downloading a full-precision checkpoint for an 8GB card. Check the VRAM table before you download, not after a two-hour transfer fails at the loading stage.
- Mixing SDXL or SD1.5 VAE and CLIP files with a FLUX checkpoint. FLUX needs its own matched VAE and its own CLIP-L plus T5-XXL text encoders. Reusing files from an older model produces broken or blank output.
- Forgetting to accept the gated license on Hugging Face. FLUX.1 Dev and FLUX.2 Dev downloads fail silently or return an authorization error until you’ve accepted the model’s license on its Hugging Face page.
- Carrying over SDXL-style CFG values. A guidance scale of 7-12 that looks normal on SDXL will oversaturate and distort a FLUX image. Stay closer to 3.5 as a starting point instead.
- Installing custom nodes without updating ComfyUI-Manager first. An outdated Manager frequently can’t resolve dependencies for newer FLUX-specific node packs, producing import errors on restart.
- Ignoring the non-commercial license on Dev-tier weights. If the output needs to be sold or used in commercial marketing, that’s a Schnell/Klein (Apache 2.0) job or a paid API call, not a Dev-tier local render.
- Stacking too many heavy custom node packs at once. Each one adds VRAM overhead even when idle, so a lean install with only the nodes you actually use stays faster and more stable.
- Forcing a resolution far outside FLUX’s comfortable range. Extreme aspect ratios or oversized canvases on a single pass tend to produce duplicated subjects or warped anatomy instead of a cleaner large image.
Troubleshooting Guide: Common ComfyUI and FLUX Errors
Keep this table nearby for your first few sessions. Almost every early error in a FLUX ComfyUI tutorial traces back to one of these causes, and most of them take under a minute to fix once correctly identified.
| Symptom | Likely cause | Fix |
|---|---|---|
| CUDA out of memory | Model too large for available VRAM | Switch to Schnell or Klein 4B, lower resolution, or launch with –lowvram |
| Black or gray image output | Wrong or missing VAE | Confirm the FLUX-matched ae.safetensors VAE is loaded, not an SDXL VAE |
| “Size mismatch” on model load | Using CheckpointLoader instead of a UNET/diffusion model loader | Match the loader node type to how the FLUX file is packaged |
| Prompt seems to be ignored | Text encoder or conditioning node wired incorrectly | Confirm DualCLIPLoader uses both clip_l and t5xxl, wired into CLIP Text Encode |
| ComfyUI won’t start, port error | Another instance already running on 8188 | Close the old process or launch with –port 8189 |
| Custom node import errors after update | ComfyUI-Manager or a node pack is out of date | Update Manager first, then update all nodes, then restart |
| Generation is extremely slow | PyTorch installed without CUDA support | Reinstall PyTorch via pytorch.org’s CUDA-specific selector |
| Model download stuck or unauthorized | Hugging Face repo is gated and license not accepted | Log in, accept the license on the model card, or use huggingface-cli login |
| Manager can’t find or install nodes | Git not on PATH, or network/firewall blocking GitHub | Confirm git runs from a plain terminal, check firewall and proxy settings |
| Apple Silicon generation feels very slow | MPS backend has less optimization than CUDA | Expect the gap, and prefer Schnell or Klein for faster iteration on Mac |
| Duplicated subjects or warped anatomy | Resolution set far outside FLUX’s comfortable native range | Generate closer to 1024×1024 or an equivalent pixel count, then upscale |
Advanced Tips for Production-Ready FLUX Workflows
Once your first images are generating cleanly, these are the upgrades worth making before you build anything you depend on daily.
- Move to fp8 or GGUF quantized weights if you’re VRAM-limited. The quality loss versus full precision is usually smaller than the headroom it buys you for larger batches or higher resolutions.
- Automate through the API, as in Step 13, for anything beyond one-off generations. A small Python queue beats manually re-entering prompts in a browser tab every time.
- Stack multiple LoRAs with individual weights to lock in a consistent character or brand style across a whole batch of images rather than a single lucky generation.
- Add ControlNet-style guidance nodes where FLUX-compatible versions exist, for pose, depth, or edge-guided composition instead of relying purely on prompt wording.
- Offload aggressively on shared GPUs. Flags like –lowvram or –novram let ComfyUI share a card with other workloads at the cost of some speed.
- Treat workflow JSON files like code. They’re plain structured JSON, so version-controlling them in git makes it trivial to track what changed between a working pipeline and a broken one.
- Add a dedicated upscaler pass instead of generating at a large resolution directly. Generating at a native-friendly size and running a separate upscale node afterward consistently produces cleaner detail than forcing a huge canvas on the first pass.
- Re-check licensing before shipping anything commercial. Non-commercial Dev-tier weights are a legal boundary, not a suggestion. Schnell, Klein’s Apache-licensed variants, or a paid Pro/Flex API call are the compliant paths for commercial output.
ComfyUI vs Other Ways to Run FLUX
ComfyUI isn’t the only door into FLUX, and it’s worth knowing what you’re trading off by choosing it. Automatic1111 and its Forge fork remain popular for Stable Diffusion but have historically lagged behind ComfyUI on native FLUX support, since FLUX’s split checkpoint-plus-encoder structure fits ComfyUI’s node model more naturally than A1111’s single-checkpoint design. ComfyUI has also kept widening that lead through direct integrations: WhatsNew.fyi listed TopazAI’s Bloom 2 and Wonder 3.5 models as native additions in ComfyUI v0.33.1 on August 13, 2026, folding professional-grade upscaling and restoration tools straight into the same node graph instead of requiring a separate app. Hosted options like Replicate’s FLUX collection (replicate.com/collections/flux) or Black Forest Labs’ own Pro and Flex API tiers need no GPU at all and bill per image, which suits occasional use or teams without dedicated hardware. Mac-only apps like Draw Things wrap a simpler interface around local generation for people who don’t want a node graph.
| Option | Setup effort | GPU required | Ongoing cost | Customization |
|---|---|---|---|---|
| ComfyUI (local) | High, one-time | Yes | Electricity only | Full node-level control |
| Automatic1111 / Forge | Moderate | Yes | Electricity only | Good, less native to FLUX’s format |
| Replicate / hosted API | Low | No | Pay per image | Limited to exposed parameters |
| BFL Pro/Flex API | Low | No | Pay per image | Limited to exposed parameters |
The trade is control versus convenience. ComfyUI takes longer to set up than any of the alternatives above, but nothing else gives you the same level of access to swap samplers, chain LoRAs, automate through an API, and keep every generation entirely on hardware you own. For a team generating a handful of images a month, a hosted API is probably the more sensible choice. For anyone generating regularly, building a repeatable pipeline, or working with prompts and reference material they’d rather not send to a third-party server, the upfront setup time in this guide pays for itself quickly.
Frequently Asked Questions
Is ComfyUI free to use?
Yes. ComfyUI itself is open-source and free, hosted publicly on GitHub. The only costs are the hardware you run it on and, for some FLUX variants, the license terms attached to the model weights rather than to ComfyUI itself.
How much VRAM do I need to run FLUX locally?
Most current guidance points to a 12GB practical minimum for FLUX Dev-tier models in ComfyUI, with 24GB or more recommended for comfortable use. Lighter variants like FLUX.1 Schnell or FLUX.2 Klein 4B can run on 8GB cards with quantization and offload enabled.
Can I use FLUX images commercially?
It depends on which model generated them. FLUX.1 Schnell and the Apache-licensed Klein variants are cleared for commercial use. FLUX.1 Dev and FLUX.2 Dev are licensed for non-commercial use only, so commercial work needs a different model or Black Forest Labs’ paid API tier instead.
What’s the difference between FLUX.1 and FLUX.2?
FLUX.2 is the newer generation, adding the compact Klein family alongside updated Dev, Pro, and Flex tiers, with native support built directly into ComfyUI. FLUX.1’s Dev and Schnell variants remain widely used and are generally lighter to run locally than their FLUX.2 counterparts.
Can I run ComfyUI and FLUX without an NVIDIA GPU?
Yes, with caveats. Apple Silicon Macs run ComfyUI through the MPS backend, and AMD GPUs on Linux can use ROCm, but both paths generally run slower than an equivalent NVIDIA CUDA setup and see less first-day support for brand-new custom nodes.
How long does it take to generate one image?
On a modern consumer GPU, expect roughly a few seconds up to a little over a minute per 1024×1024 image, depending on the model variant, step count, and quantization format you chose. FLUX.1 Schnell, built for few-step generation, is consistently the fastest option in ComfyUI.
Is ComfyUI better than Automatic1111 or Forge for FLUX?
For FLUX specifically, most of the ecosystem has gravitated toward ComfyUI because its node-based structure matches FLUX’s split checkpoint and dual text-encoder design more directly. A1111 and Forge remain solid choices for older SD1.5/SDXL work.
Why does my image look completely different from the same prompt on another tool?
Different tools default to different samplers, schedulers, guidance values, and even different FLUX variants entirely, and all four change the output meaningfully. A prompt that looks one way on a hosted API using FLUX.2 Pro won’t match a local ComfyUI render using FLUX.1 Schnell at four steps, even with identical wording, because the underlying model and settings aren’t the same.
Where can I find more workflows and LoRAs for FLUX?
ComfyUI Manager’s built-in template browser is the fastest starting point, and Comfy Org publishes example workflows directly. From there, community hubs built around Stable Diffusion and FLUX host a wide range of shared workflows and LoRA files, though quality and licensing vary, so check each file’s terms before commercial use. The tutorial ecosystem around ComfyUI has grown right alongside it: Gitnux counted more than 450 community tutorials with a combined 5M+ views by February 2026, WifiTalents put cumulative YouTube upvotes on ComfyUI tutorials at 50,000 by that same month, and Earngenix’s “150+ Free ComfyUI Workflows” roundup of Nomadoor’s tutorial site counted over 150 ready-made workflows as of September 7, 2026, so a stuck workflow usually already has a walkthrough somewhere if the official docs and Manager browser come up short. For a more structured, paid alternative to piecing tutorials together, Digital Art Live has run a dedicated ComfyUI course with promotional pricing, including a 15% discount via the code comfyui15.





