
Ask ChatGPT to swap your photo's background and you get back a new person. Different face, different pose, different shirt. The background is right, but the subject is gone.
Flux Kontext does the opposite: it swaps only the background. The person, their pose and their clothing stay pixel for pixel the same – only the surroundings change. That's the difference between "a new image" and "edit this image".
This guide walks the whole path – tested locally on an RTX 3060 with 12 GB of VRAM, free, no cloud required. And no add-on model: background swaps are something Kontext does out of the box.
Updated: July 2026 · ComfyUI (current) · Flux.1 Kontext Dev as GGUF · Custom node "ComfyUI-GGUF"
What you'll get:
- Why Kontext keeps the person – while ChatGPT reinvents them
- The 4 model files and exactly where they go
- The ComfyUI workflow in 4 steps – with the GGUF trick for 12 GB cards
- The right prompt wording for background swaps
- One photo, any number of backgrounds – the prompt templates
- Fixes for when the person changes along with the background
Kontext vs. "ChatGPT could've done that too"
The key term is image conditioning. Kontext gets your original image not as a vague description but as a fixed reference point (the ReferenceLatent node in the workflow). The model holds everything you don't mention constant and computes only the named change.
In practice:
- One photo, one prompt, one new background – no redrawing of the person.
- The subject's face, pose, clothing and lighting stay intact.
- You can place the same photo into any number of scenes – studio, café, nature.
That's the practical lever: put portraits, team photos, model shots or product images into any environment from one source shot – no second shoot, no hand-cutouts.

Requirements
| What | Recommendation |
|---|---|
| Graphics card | NVIDIA with ≥ 8 GB VRAM (tested on RTX 3060/12 GB) |
| Software | ComfyUI (current version) |
| Custom node | ComfyUI-GGUF (for the GGUF loader) |
| Storage | ~ 12 GB free for the model files |
💡 Tip: We deliberately use the GGUF variant of Flux Kontext (Q4_K_M, ~6.8 GB). GGUF is a compressed format – so a 12-billion-parameter model runs smoothly on a 12 GB card, where the full fp16 version (~24 GB) would be far too large.
⚠️ Warning: ComfyUI Desktop and the portable version do not share models. Put the files in the models folder of the version you actually launch.
Keine starke Grafikkarte? Führe ComfyUI in der Cloud aus.
Flux & SDXL sind speicherhungrig. Statt ~1.800 € für eine eigene Karte mietest du bei RunPod eine 24-GB-GPU ab ca. 0,50 €/Stunde – und zahlst nur, was du nutzt.
Step 1: Install the custom node "ComfyUI-GGUF"
The GGUF loader isn't a default node – it comes via the Manager:
- Start ComfyUI → click Manager on the right.
- Open Custom Nodes Manager → search for
ComfyUI-GGUF→ Install. - Fully restart ComfyUI.
Without this step, the "Unet Loader (GGUF)" node is missing later and the workflow stays red.
Step 2: Download the four models and place them right
Flux Kontext has four parts: the main model, two text encoders and a VAE. No add-on model needed – the background swap lives in the base model.
| File | Source | Folder |
|---|---|---|
flux1-kontext-dev-Q4_K_M.gguf | 🤗 HuggingFace: QuantStack/FLUX.1-Kontext-dev-GGUF | models/unet/ |
t5xxl_fp8_e4m3fn.safetensors | 🤗 comfyanonymous/flux_text_encoders | models/text_encoders/ |
clip_l.safetensors | 🤗 comfyanonymous/flux_text_encoders | models/clip/ |
ae.safetensors | 🤗 black-forest-labs/FLUX.1-schnell (VAE) | models/vae/ |
The folder structure then looks like this:
📁 ComfyUI/
└── 📁 models/
├── 📁 unet/
│ └── flux1-kontext-dev-Q4_K_M.gguf
├── 📁 text_encoders/
│ └── t5xxl_fp8_e4m3fn.safetensors
├── 📁 clip/
│ └── clip_l.safetensors
└── 📁 vae/
└── ae.safetensors
📌 Note: After copying, restart ComfyUI once, otherwise the models won't show up in the dropdowns.
Step 3: Load the Kontext workflow – with the GGUF trick
You build nothing by hand. ComfyUI ships the workflow as a template:
- Click Workflow → Browse Templates at the top.
- Category Flux → pick "Flux.1 Kontext Dev (Basic)". The full graph loads automatically.
- Now the one important move for 12 GB cards: delete the "Load Diffusion Model" node. Right-click the canvas → Add Node → bootleg → Unet Loader (GGUF) → select
flux1-kontext-dev-Q4_K_M.gguf→ reconnect the MODEL output to the KSampler.
Quickly check the remaining loaders:
- DualCLIPLoader →
t5xxl_fp8_e4m3fn+clip_l,type: flux - VAELoader →
ae.safetensors
🔑 Remember: The default template loads the full model via "Load Diffusion Model". That single node gets swapped for Unet Loader (GGUF) – the rest of the workflow stays identical.
Step 4: Load image, write the prompt, generate
1. Load image. Upload your source photo in the Load Image node.
2. Write the prompt. Put the new scene in the positive prompt – Flux is most reliable in English. The crucial addition: explicitly pin the person.
change the background to a green city park on a sunny day, keep the person and clothing exactly the same3. Set the parameters. The tested values for Kontext:
| Parameter | Value | Why |
|---|---|---|
| Sampler | euler | stable for Flux |
| Scheduler | simple | standard for Kontext |
| Steps | 8 | fast & tested; 20 for maximum detail |
| Guidance | 2.5 | Kontext standard – higher = more literal |
| CFG | 1.0 | fixed for Flux |
4. Generate. Click Queue Prompt.
🧪 Try it: The first run takes ~2 minutes because the model loads into VRAM. Every further background runs at ~30–60 seconds on the RTX 3060.
Result: the person now stands in the park – face, pose, t-shirt and jeans unchanged.
One photo, any number of backgrounds
Because the subject stays fixed, every further background is just a new prompt. The same photo – studio, café, nature:

Kontext is precise when you are. Two rules:
- Name the scene concretely – place, light, mood. "a cozy sunlit cafe interior with warm bokeh" beats "nice background".
- Pin the person. The addition
keep the person and clothing exactly the samestops Kontext from computing over the subject.
A few proven templates:
| Background | Prompt |
|---|---|
| Studio white | change the background to a clean seamless white studio backdrop, keep the person exactly the same |
| Café / indoor | change the background to a cozy sunlit cafe interior with warm bokeh, keep the person exactly the same |
| Nature / park | change the background to a green city park on a sunny day, keep the person exactly the same |
| Beach | change the background to a sandy beach at golden hour, keep the person exactly the same |
| Gradient | change the background to a soft pastel gradient studio backdrop, keep the person exactly the same |
Person changes too? Quick fixes
| Problem | Cause | Fix |
|---|---|---|
| Models not in dropdown | ComfyUI not restarted | restart ComfyUI |
| "Unet Loader (GGUF)" node missing | ComfyUI-GGUF not installed | Manager → install ComfyUI-GGUF |
| Face/clothing changes | person not pinned | add keep the person and clothing exactly the same |
| Background barely changes | guidance too low | raise guidance to 3.0–3.5 |
| Hard edge / "halo" around the person | scene described too high-contrast | name softer light ("soft diffused light"), steps to 20 |
| Red nodes / errors | file in the wrong folder | check folders per the table above |
Swapping a whole catalog? Use the cloud
A single photo renders in seconds on the RTX 3060. For a whole batch – an entire portfolio or product catalog into the same background – a cloud GPU pays off: an RTX 4090 (24 GB) from ~$0.59/h works through batches with no quant compromise. The full setup is in our hub:
👉 RunPod: rent a cloud GPU for ComfyUI
Keine starke Grafikkarte? Führe ComfyUI in der Cloud aus.
Flux & SDXL sind speicherhungrig. Statt ~1.800 € für eine eigene Karte mietest du bei RunPod eine 24-GB-GPU ab ca. 0,50 €/Stunde – und zahlst nur, was du nutzt.
Conclusion & next steps
Flux Kontext isn't image generation, it's image direction: you keep your subject and swap the surroundings on purpose. The background swap is one of the strongest entry points – the same technique carries clothing, hairstyles and product variants.
- 📥 Download: Get the background workflow as JSON – load it in ComfyUI via Workflow → Open, drop in your photo, put the scene in the prompt, generate.
- 🔗 Missing the basics? → Install Flux.1 Dev with ComfyUI
- ⏮️ From the series: Flux Kontext: Change Clothes in ComfyUI
- ⏭️ Up next: "Flux Kontext: Change Hairstyle" and "Flux Kontext: Remove an Object".
One photo, one sentence – and the same person stands anywhere, without a single reshoot.