Earngenix Logo
Skip to main content

ComfyUI Workflow Guide · All Levels · Open Source

Flux Kontext Character Consistency in ComfyUI: Full Workflow Guide

Keep the same character across as many poses and scenes as you want — no LoRA training, just one reference photo and FLUX.1 Kontext Dev. This guide covers every node, the exact instruction format that holds identity, and every failure mode that breaks it.

11 GB

Min VRAM

RTX 4090

Tested on

v0.3.42

ComfyUI

All levels

Skill level

By Earngenix Team · · Tested on RTX 4090 (24 GB) · ComfyUI v0.3.42 · Model: flux1-kontext-dev.safetensors

⚡ Quick Answer

To keep a character consistent in ComfyUI with FLUX.1 Kontext Dev, load one reference photo, scale it with FluxKontextImageScale, encode it to a latent with VAEEncode, and merge that latent into your prompt's conditioning with ReferenceLatent. Kontext then generates the character in a new pose or setting while holding the face, hair, and outfit close to the original. Minimum 11 GB VRAM using the fp8 model.

Getting the same character to show up correctly across ten different images used to mean training a LoRA on that character first. FLUX.1 Kontext Dev changes this — hand it one reference photo and a text instruction, and it generates a new pose or scene while keeping the face, outfit, and hairstyle close to the source. No training required.

This guide walks through the exact workflow: which nodes to connect, what each setting does, and how to write instructions that keep identity intact instead of drifting into a different-looking person by the third generation.

If you're working with Qwen Image Edit or Krea 2 instead — including multi-character scenes with two or more people in one frame — see the general ComfyUI character consistency guide or the Krea 2 character consistency guide. This page is specific to the Kontext node chain, which is different from both.

Tested on: ComfyUI v0.3.42, RTX 4090 (24 GB VRAM).
Minimum VRAM: 11 GB (fp8 model).

How Identity Is Preserved

Kontext carries your reference photo into the sampler through a single path — and every node in that path has to be connected correctly, or identity breaks:

  • FluxKontextImageScale — resizes and pads your reference photo to one of the resolution buckets Kontext was trained on. Feeding it an arbitrary resolution without this node produces warped or cropped identity in the output.
  • VAEEncode — converts that scaled reference image into a latent.
  • ReferenceLatent — merges the VAE-encoded reference latent into your positive conditioning, right before it reaches the sampler.
Warning: Unlike Qwen Image Edit or Krea 2, Kontext has no separate vision-capable text encoder reading the image alongside your words. The ReferenceLatent chain is the only path carrying the reference photo. If any node in that chain — FluxKontextImageScale, VAEEncode, or ReferenceLatent — is disconnected, the model falls back to generating from your text prompt alone with no identity to hold onto.

Your instruction (encoded through a standard CLIPTextEncode, using the T5-XXL + CLIP-L pair) still matters — it tells Kontext what to keep and what to change — but the latent path is what actually anchors the face.

Example: One Reference, Three Scenes

Below is one reference photo and three separate generations from that same reference — swap in your own screenshots here. Click any image to zoom.

Reference photo of the character loaded into the LoadImage node — the source identity every output is checked against🔍 Click to zoom
Reference photo — the LoadImage input every output below is checked against.
Character generated sitting on a cream sofa in a five-star hotel lounge, identity preserved from the reference photo
🛋️ Same reference · 1024×1024 · steps 20 · guidance 2.5
🔍 Click to zoom

New Pose + Setting — Elegant Garden

Character generated seated at a Parisian café terrace, identity preserved from the same reference photo
☕ Same reference · 1024×1024 · steps 20 · guidance 2.5
🔍 Click to zoom

New Pose + Setting — Luxury Hotel Lounge

Character generated standing on a rooftop terrace with a city skyline at night, identity preserved from the reference photo
🌃 Same reference · 1024×1024 · steps 20 · guidance 2.5
🔍 Click to zoom

New Pose + Setting — Beach Sunset

Tip: Write the "KEEP" instruction first, before describing the new scene. Putting preservation language at the start of the prompt weights it more heavily than burying it at the end.

What You Need

Kontext ships as separate model, text-encoder, and VAE files — ComfyUI does not bundle them into one checkpoint. Download these before you start.

FileSizeVRAMNotesDownload
flux1-dev-kontext_fp8_scaled.safetensors~11 GB12 GB+Recommended for most users↗ Download
flux1-kontext-dev.safetensors (full)~24 GB24 GB+Full precision — for 24 GB+ cards only↗ Download
FLUX.1-Kontext-dev GGUF (Q4–Q8)4–12 GB6 GB+Needs the ComfyUI-GGUF custom node pack↗ Download
t5xxl_fp16.safetensors~9.5 GBRequiredText encoder, half of the pair↗ Download
clip_l.safetensors~246 MBRequiredText encoder, half of the pair↗ Download
ae.safetensors~335 MBRequiredDecodes the finished latent to a PNG↗ Download
Which diffusion model to download? The fp8 scaled version is under half the size of the full model with very little visible difference in output. Under 24 GB VRAM, use fp8. GGUF goes lower still but needs an extra custom node pack (city96/ComfyUI-GGUF) and a UnetLoaderGGUF node in place of the standard UNETLoader.

Pre-flight checklist

12–16 GB VRAM: Use the fp8 scaled model.
24 GB+ VRAM: fp8 or full precision, either works.
6–11 GB VRAM: Use a GGUF quant (Q4_K_M or Q5_K_M) — install ComfyUI-GGUF first.
Low VRAM either way: Set weight_dtype on the UNETLoader node to fp8_e4m3fn or fp8_e5m2 if you hit out-of-memory errors even on the fp8 file.

Where to Place the Files

Each file type goes in a different subfolder under ComfyUI's models/ directory. A file in the wrong folder means the dropdown in that node stays empty.

ComfyUI / models / folder structure
ComfyUI/
└── models/
├── diffusion_models/
│ └── flux1-dev-kontext_fp8_scaled.safetensorsmain model
│ └── flux1-kontext-dev.safetensorsalt: full precision
├── clip/
│ ├── t5xxl_fp16.safetensorstext encoder
│ └── clip_l.safetensorstext encoder
└── vae/
└── ae.safetensorsimage decoder
diffusion_models/ — main model (pick one)clip/ — dual text encoder pairvae/ — image decoder
Warning: Do not place the Kontext diffusion model inside models/checkpoints/. This workflow loads it through UNETLoader, which only reads from diffusion_models/.
Tip: If your ComfyUI build reads text encoders from a models/text_encoders/ folder instead of models/clip/, place the t5xxl and clip_l files there instead — check whichever folder your DualCLIPLoader dropdown is actually pointing at.

Download the Workflow

🔧 Flux Kontext Character Consistency — Workflow Download

Download the ready-to-use ComfyUI workflow JSON. Drag it onto the canvas, load your reference photo, and generate.

How to Load the Workflow JSON into ComfyUI

  1. Download the .json file to your computer.
  2. Open ComfyUI in your browser — usually at http://127.0.0.1:8188.
  3. Drag the .json file directly onto the ComfyUI canvas. Drop it anywhere on the empty grey area.
  4. The workflow loads automatically. You should see the Model Loaders, Size, and Sampling groups appear on the canvas.
  5. If you see only red error blocks, jump to the Troubleshooting section below.
Flux Kontext character consistency workflow loaded on the ComfyUI canvas — model loaders, image loader, and sampling groups visible🔍 Click to zoom
Screenshot: The loaded workflow on the ComfyUI canvas.

Workflow Structure: What Each Node Does

Here's what each node in the chain controls, left to right:

NodeWhat it does
LoadImageYour reference photo of the character. Feeds FluxKontextImageScale.
DualCLIPLoaderLoads the T5-XXL + CLIP-L text encoder pair, type set to "flux".
VAELoaderLoads the VAE. Feeds both the final image decode and the reference-photo encode.
UNETLoaderLoads the FLUX.1 Kontext Dev diffusion model — the model that generates the image.
CLIPTextEncodeYour instruction — what to keep and what to change.
FluxGuidanceSets the guidance strength applied to your instruction (this workflow uses 2.5).
FluxKontextImageScaleResizes the reference photo to a resolution Kontext was trained on, before encoding.
VAEEncodeConverts the scaled reference photo into a latent.
ReferenceLatentMerges the positive conditioning with the VAE-encoded reference latent — the node that keeps the face consistent.
ModelSamplingFluxPatches the model's noise schedule to match your output width and height.
RandomNoise → KSamplerSelect → BasicScheduler → BasicGuider → SamplerCustomAdvancedFLUX's native advanced sampling chain — five small nodes doing the job a single KSampler does on older models.
EmptySD3LatentImageSets the output canvas size (1024×1024 by default), fed by the width/height nodes.
VAEDecode → SaveImageConverts the finished latent into a PNG and writes it to disk.
You'll also see several small collapsed Set_ / Get_ node pairs scattered around the canvas (from the KJNodes pack). These aren't extra logic — they're wiring shortcuts that carry a value like CLIP or VAE across the canvas without a visible line. Ignore them; connections still work the same underneath.

Step-by-Step Setup

  1. In DualCLIPLoader, select t5xxl_fp16.safetensors and clip_l.safetensors, and confirm type reads flux.
  2. In VAELoader, confirm ae.safetensors is selected.
  3. In UNETLoader, select your Kontext model file. Set weight_dtype to fp8_e4m3fn here if you're on a card under 16 GB.
  4. Click LoadImage and upload your reference photo. Use a clear, well-lit, front-facing shot — side profiles and heavy shadows make identity lock harder.
  5. Open the CLIPTextEncode node and write your instruction — see the next section for the exact structure.
  6. Confirm the width/height PrimitiveInt nodes feed both EmptySD3LatentImage and ModelSamplingFlux — this workflow defaults to 1024×1024.
  7. Click the orange Queue Prompt button. A progress bar appears below it. On an RTX 4090 at 20 steps, generation takes roughly 15–30 seconds.

How to Write the Instruction

Structure every instruction in two parts: what to preserve, then what to change. Lead with the preservation language — it carries more weight at the start of the prompt than buried at the end.

Instruction structure
KEEP the same [subject] and change the pose and setting: [new pose, new location, new framing — be specific about posture, hands, expression, camera angle]. Preserve exact facial identity, makeup, hairstyle, body proportions, clothing, accessories, and all fine details from the reference image.

Worked example from this workflow:

Example instruction — CLIPTextEncode
KEEP the same woman and change the pose and setting: she is now sitting gracefully on a luxurious cream-colored sofa inside an elegant five-star hotel lounge with tall marble columns, crystal chandeliers, and warm golden lighting. She sits with one leg elegantly crossed over the other, her left arm resting comfortably along the back of the sofa while her right hand gently holds a porcelain coffee cup on her lap. Calm, confident expression with a soft smile, looking slightly toward the camera. Preserve exact facial identity, makeup, hairstyle, body proportions, clothing, accessories, and all fine details from the reference image.

There's no separate negative prompt in this workflow — Kontext's conditioning runs through ReferenceLatent alone, so unwanted patterns are usually fixed by adjusting the instruction itself rather than rejecting them in a negative field.

Settings That Matter

steps
20— BasicScheduler; Kontext isn't distilled, so it needs more steps than Turbo-class models
guidance
2.5— FluxGuidance; higher follows the instruction more literally
sampler
euler— KSamplerSelect, the default this workflow ships with
scheduler
simple— BasicScheduler, paired with euler
denoise
1— full denoise from an empty latent
max_shift / base_shift
1.15 / 0.5— ModelSamplingFlux; wired to width/height automatically
resolution
1024×1024— default output canvas
ModelSamplingFlux and BasicScheduler nodes showing max_shift, base_shift, steps, and scheduler values🔍 Click to zoom
Screenshot: The Sampling group with the default settings for this workflow.

FLUX.1 Kontext Dev is a full, non-distilled model, so it needs more steps than a Turbo-class model like Krea 2. The max_shift and base_shift values in ModelSamplingFlux are wired to your width/height so the sampling schedule stays matched to your output resolution automatically — leave them unless you know you need to tune them.

Going Further: Stacking a Style LoRA

Once identity holds up reliably, you can stack a style LoRA on top of the Kontext model to push the output toward a specific look — cinematic grading, an illustration style, a particular photography aesthetic — without touching the reference-latent chain that holds the face.

Node needed: a standard LoraLoaderModelOnly node, inserted between UNETLoader and ModelSamplingFlux. This applies the style to the model before the reference-latent conditioning is merged in, so identity preservation isn't affected.

Need multiple characters in the same frame instead of one at a time? That's a different node setup — see the multi-reference section of the general ComfyUI character consistency guide.

"This node type does not exist" (red node in workflow)

The workflow uses a custom or newer core node you haven't installed. FluxKontextImageScale, ReferenceLatent, and ModelSamplingFlux are relatively recent core additions.

  1. Click Manager in the top menu.
  2. Click Install Missing Custom Nodes.
  3. Restart ComfyUI completely.

If nodes still show red, update ComfyUI itself.

The character's face looks different in the output

This usually means the reference-latent chain isn't reaching the sampler correctly, or the reference photo is a poor angle for the model to lock onto.

  1. Confirm FluxKontextImageScale → VAEEncode → ReferenceLatent is fully connected, not left disconnected anywhere in the chain.
  2. Confirm ReferenceLatent receives both the positive conditioning and the VAE-encoded latent.
  3. Try a clearer, more front-facing reference photo.
  4. Make sure the KEEP instruction comes first in your prompt, not after the scene description.

Out of memory / CUDA error during generation

The full-precision model is roughly 24 GB and can exceed VRAM on cards under 24 GB.

  1. Switch to flux1-dev-kontext_fp8_scaled.safetensors, or a GGUF quant if you're under 12 GB.
  2. Set weight_dtype on the UNETLoader to fp8_e4m3fn or fp8_e5m2.
  3. Lower your output resolution (try 768×768 instead of 1024×1024).
  4. Close other GPU-heavy applications before queuing.

Frequently Asked Questions

No. This workflow uses a single reference image and Kontext's built-in reference-latent conditioning — no training step required.

The most common cause is a missing or disconnected link somewhere in the FluxKontextImageScale → VAEEncode → ReferenceLatent chain. There's no separate image-aware text encoder here — this chain is the only path holding identity.

Only with a GGUF quant (Q4_K_M or lower) and the ComfyUI-GGUF node pack installed. The standard fp8 model still needs around 11–12 GB VRAM minimum.

Krea 2 and Qwen both use an image-aware text encoder alongside a reference-latent path — two paths carrying identity. Kontext uses only the reference-latent path, plus FLUX's native five-node sampling chain instead of a single KSampler.

FLUX-family models expose their sampling loop as separate RandomNoise, KSamplerSelect, BasicScheduler, BasicGuider, and SamplerCustomAdvanced nodes. This gives more control over each part of the process, at the cost of a busier canvas than a single KSampler node.

Yes. FLUX models use a dual text encoder — T5-XXL and CLIP-L together, loaded through DualCLIPLoader. Missing either one leaves the CLIP dropdown incomplete.

What to Do Next

Download the workflow. Run one test scene. Compare it to the reference.

Once identity holds up on a clean generation, try the same reference photo across a few different settings and expressions — see the multi-angle guide below if you need a specific pose or camera angle rather than a full new scene.

Published: 2026-07-14 · Last updated: 2026-07-14 · Tested on RTX 4090 (24 GB VRAM) · ComfyUI v0.3.42 · Model: flux1-kontext-dev.safetensors

Discussion

Join the discussion

Sign in to leave a comment or reply

💬

No comments yet

Be the first to share your thoughts!