FLUX.2: Dev Multi-Reference Consistency and Klein Lightweight Edition
FLUX.2 is Black Forest Labs' next-generation image model: up to 4MP photographic-grade output, with comprehensive upgrades to lighting, skin, fabric, and hand details. It upgrades FLUX.1's "single reference image" to multi-reference consistency — up to 10 reference images — keeping characters, product geometry, materials, and clothing consistent across multiple outputs; text rendering has also reached professional grade, producing clean, readable text for UI screenshots, infographics, and multilingual content.
ComfyUI-wise, there are two options here: FLUX.2 Dev (the open-source full edition, with the best results) and FLUX.2 [Klein] (the lightweight edition, one architecture unifying text-to-image and editing, with the 4B distilled edition generating in 4 steps on about 8.4GB of VRAM). This page walks you through both FLUX.2 workflows.
What You'll Be Able to Do After Learning
- Run the FLUX.2 Dev multi-reference workflow: load the template → put the three-piece set in place → generate images with multi-reference consistency editing
- Attach multiple reference images into the conditioning with the ReferenceLatent chain: design draft + product photo → apply the pattern to the physical item
- Switch to the FLUX.2 Klein 4B lightweight edition: distilled, generating in 4 steps, running locally on 8GB-level VRAM
- Distinguish the two weight systems: Dev's fp8mixed quantization tier vs. Klein 4B/9B, each with base and distilled variants — no more downloading the wrong files
- Remember the node differences between FLUX.2 and FLUX.1: the single-encoder CLIPLoader (type
flux2) replaces DualCLIPLoader
Your Current Struggles
- Want to repackage a product: one design draft and one product photo, but ordinary image-to-image just "averages" the two into something unrecognizable
- Generating 10 images of the same character, each with a different face, outfit, and art style — consistency is pure luck
- Heard FLUX.2 delivers great results, then saw the model is 33GB — wondering whether your GPU can even run it
When to Use This Technique
When you need:
- Multi-reference consistency: combine multiple reference images — character + clothing + scene — into one image, taking the best of each
- Professional text rendering: large poster text, UI interfaces, and brand text on packaging must be clean and readable
- Precise hex brand colors: specify a color code and the output palette won't drift
- FLUX.2 quality even on low-end setups: Klein 4B runs on 8.4GB of VRAM
And you don't want to:
- Lose the reference image features every time — FLUX.1 Kontext's single reference image can't support multi-image composition
- Spin up a cloud API for a single image — both Dev and Klein are open source and run locally
🎒 Preparation Before Starting
- Have completed FLUX.1 text-to-image: the FLUX family's loader patterns and the "no negative prompt" convention are covered in that lesson
- Able to load templates and run with
Ctrl+Enter(if you forgot, review first generation) - Familiar with the model directory rules: place files in the corresponding subdirectory under
models/(review where to put models) - ComfyUI updated to 0.4.0 or later (the minimum version noted in the official FLUX.2 Dev template; the Klein template requires 0.3.72 or later)
- Disk space reserved: about 66GB for the full Dev run (including 33GB of text encoders); switch to fp8 text encoders to save space at about 50GB; about 12GB if only running Klein 4B
- Network able to reach Hugging Face; if the connection is unstable, use the ModelScope domestic mirror (address given in Step 2)
- A cup of water ☕ — downloading Dev's models is the biggest wait in this lesson
Core Idea
FLUX.2 splits into two branches at the model level, and the workflows split into two sets accordingly:
| Branch | Positioning | Diffusion model | Steps |
|---|---|---|---|
| FLUX.2 Dev (open-source, full weights) | Quality ceiling: 4MP photographic-grade, multi-reference consistency, professional text rendering | (flux2_dev_fp8mixed 33.02GB, fp8 quantized weights; full weights in the BFL original repo) | 20 |
| FLUX.2 [Klein] (lightweight) | Interactive low latency: one architecture unifying text-to-image and image editing | 4B / 9B two tiers, each with a base (non-distilled) and a distilled variant | Distilled 4 steps, base 20 steps |
FLUX.2 Pro is Black Forest Labs' API version and is not open source — the two branches in the table above are what you can run locally.
How multi-reference consistency is wired into the workflow: The ReferenceLatent node encodes reference images into latents and "hooks" them into the conditioning chain. Conditioning comes out of FluxGuidance, passes through ReferenceLatent, then enters BasicGuider; to add a second reference image, chain another one from the conditioning output of the previous ReferenceLatent. At the model level up to 10 reference images are supported, so characters, product geometry, materials, and clothing stay consistent across outputs.
Compared with the node chain you saw in FLUX.1 text-to-image, FLUX.2 swaps three key parts:
| Stage | FLUX.1 (Dev text-to-image template) | FLUX.2 (Dev edit template) |
|---|---|---|
| Text encoder | DualCLIPLoader: clip_l + t5xxl, two files | CLIPLoader: mistral, single file, type set to flux2 |
| Sampling/scheduling | KSampler one node does it all | Flux2Scheduler (steps + width/height) + SamplerCustomAdvanced split apart |
| Empty latent | EmptySD3LatentImage | EmptyFlux2LatentImage |
| Reference image | Kontext single reference image | ReferenceLatent chained to attach multiple images (up to 10) |
Klein's official performance data (RTX 5090):
| Version | Steps | VRAM | End-to-end time |
|---|---|---|---|
| Klein 4B distilled | 4 | 8.4GB | ~1.2s |
| Klein 4B base | 20 | 9.2GB | ~17s |
One-line pick: Go with Dev for quality, Klein distilled for speed, and Klein base if you want to fine-tune it yourself.
Follow along
Step 1: Load the FLUX.2 Dev official template
Why: The official template already has the node chain, parameters, and model links configured; we just need to drop in our assets.
How: Open the template library from Templates in the left sidebar, search for FLUX.2, and pick "FLUX.2 Dev" (template name image_flux2, requires ComfyUI 0.4.0 or above). If you'd rather not use the template library, you can also download image_flux2.json and open it manually. See Template Library for the full guide to the template library.
On the canvas is a three-stage main chain: LoadImage → (ImageScaleToTotalPixels first scales the image down to 1MP) → the "Image Edit (FLUX.2 Dev)" subgraph → SaveImage. Upload the official sample image image_flux2_input_image.png (a photo of a woman) to the LoadImage node 46, or just swap in your own image.
You should see: When models are missing, the subgraph nodes turn red and the Errors tab on the right lists the models to download — no rush, step 2 will fill them in one by one.
- Template loaded successfully; you can see your uploaded image in
LoadImage
Step 2: Download the FLUX.2 workflow's three-piece set and put them in place
Why: The template only references file names; you have to download the model files yourself and put them into the corresponding subdirectories under models/ so the nodes don't show red.
How: Download according to the list below (copy the file names and sizes exactly from the Model links annotation on the template canvas):
| File | Put into | Size | Download URL |
|---|---|---|---|
flux2_dev_fp8mixed.safetensors | models/diffusion_models/ | 33.02 GB | Hugging Face |
mistral_3_small_flux2_bf16.safetensors | models/text_encoders/ | 33.14 GB | Hugging Face |
full_encoder_small_decoder.safetensors | models/vae/ | 238 MB | Hugging Face |
Flux_2-Turbo-LoRA_comfyui.safetensors (optional) | models/loras/ | 2.57 GB | Hugging Face |
Hugging Face connection unstable? The Dev three-piece set is all in Comfy-Org's repo; use a domestic mirror: ModelScope: Comfy-Org/flux2-dev. You can also click Download one by one in the Errors tab on the right side of the template.
⚠️ Don't copy the VAE list from the official tutorial page
The Model links on the official tutorial page list flux2-vae.safetensors (320.6MB), but the FLUX.2 Dev template actually loads full_encoder_small_decoder.safetensors (238MB, from BFL's FLUX.2-small-decoder repository). Follow the Model links annotation inside the template canvas for your download list; otherwise the file won't be selectable in the VAELoader dropdown. flux2-vae.safetensors is used later by the Klein and Product Mockup templates.
Space-saving option: the text encoder can be swapped for the fp8 version mistral_3_small_flux2_fp8.safetensors (16.8GB, 16GB less disk space; it's the one used by the Product Mockup template in step 6) — just select the corresponding filename in CLIPLoader.
You should see: the corresponding files can be selected in the dropdowns of all three loaders (UNETLoader / CLIPLoader / VAELoader), and the nodes are no longer marked red.
- The three files are in place and the template shows no red errors
Step 3: Understand the node chain of FLUX.2
Why: knowing where each node sits in the chain tells you where to look when errors occur; this is also the area where FLUX.2 and FLUX.1 differ the most.
How to: double-click the "Image Edit (FLUX.2 Dev)" subgraph to enter it, and with the difference table from the core idea section, locate the four branches:
- Model section:
UNETLoader(diffusion model) +CLIPLoader(mistral, type set toflux2) +VAELoader - Conditioning chain:
CLIPTextEncode(positive prompt) →FluxGuidance(4) →ReferenceLatent→BasicGuider - Reference image: the input image is first scaled to 1MP on the canvas by
ImageScaleToTotalPixels, then inside the subgraph it's encoded into a latent byVAEEncodeand fed into the latent input ofReferenceLatent - Size and scheduling:
GetImageSizereads the input image's width and height and passes them to bothEmptyFlux2LatentImage(empty latent) andFlux2Scheduler(20 steps, outputs SIGMAS) — the output size follows the input image
Inside the subgraph there is also an "Enable 8 steps lora" toggle (off by default): when turned on, it automatically attaches the Turbo LoRA downloaded in step 2 and switches the step count from 20 to 8; this is used in the advanced techniques section.
You should see: you can point out ReferenceLatent's two inputs by hand — conditioning comes from FluxGuidance, and the latent connects to the reference image's VAEEncode.
- You can state the order of the conditioning chain: prompt → FluxGuidance → ReferenceLatent → BasicGuider
Step 4: Write a prompt and run a consistency edit
Why: FLUX.2 Dev's editing prompts are descriptive — directly describe the final image you want, then declare the parts to keep, rather than giving traditional instruction-style edit commands like "add the hat".
How to: the official example prompt is already filled in the template; study its structure:
The woman is wearing a small pale yellow knitted beanie, with a white fabric
patch on the front right, embroidered with big gray text "FLUX.2 COMFY."
Keep the faceBroken down, it's three parts: describe the new object (light yellow knit beanie + white fabric patch + large gray text) → specify the position (front right) → lock in the parts to keep (Keep the face). Text rendering is FLUX.2's strength, and the "FLUX.2 COMFY" on the fabric patch will actually be readable.
Run with Ctrl+Enter.
You should see: the progress bar completes 20 steps, and in the output the woman wears a light yellow knit beanie, the "FLUX.2 COMFY" text on the fabric patch is clearly readable, and the face matches the original image.
Want to attach a second reference image (true multi-reference)? Chain another ReferenceLatent from the conditioning output of the existing ReferenceLatent, and connect the new node's latent port to the second image's VAEEncode. If you'd rather not wire it manually, the Product Mockup template in step 6 already has two reference images connected — just look at how it's wired.
- In the output image, the new object, the text, and the preserved face all hold at once
Step 5: Switch to the Klein 4B lightweight version (distilled, 4-step generation)
Why: the Dev three-file set is about 66GB and 20-step generation is slow; the Klein 4B distilled version takes about 12GB of disk, 4 steps, and 8.4GB of VRAM, making it suitable for quick previews and interactive editing.
How to: search FLUX.2 Klein in the template library and select "FLUX.2 [Klein] 4B Distilled: Image Edit" (template name image_flux2_klein_image_edit_4b_distilled, requires ComfyUI 0.3.72 or above). Klein's three files are completely different from Dev's:
| File | Put into | Size | Download URL |
|---|---|---|---|
flux-2-klein-4b-fp8.safetensors | models/diffusion_models/ | 3.79 GB | Hugging Face |
qwen_3_4b.safetensors | models/text_encoders/ | 7.49 GB | Hugging Face · ModelScope |
flux2-vae.safetensors | models/vae/ | 320.6 MB | Hugging Face · ModelScope |
Note that this time the VAE is flux2-vae.safetensors — it's the one the Klein template uses. The diffusion model is in the BFL repository, and the template annotation gives no domestic mirror; both the text encoder and the VAE can come from ModelScope.
The template ships with official examples: handbag_white.png (node 76, white handbag) and comfy_logo_blue.png (node 81, blue Comfy logo). The template has two paths pre-wired:
- Enabled by default (single-reference recolor): prompt
Change the bag color to blue., the handbag turns blue - Bypassed by default (dual-reference multi-reference): prompt
stylize the handbag in image1 with the colours and logo from image 2— usesimage1/image 2to refer to the two reference images, applying the blue logo's colors and logo to the white handbag
First run the default path with Ctrl+Enter; to see the multi-reference effect, switch the bypassed path back to enabled and run again. The scheduler is Flux2Scheduler: 4 steps, default size 1024×1024, euler sampling.
You should see: 4-step sampling finishes in seconds (official data: about 1.2s end-to-end on a 5090), the white handbag turns blue; after enabling the second path, the output handbag carries the blue Comfy logo's colors and logo.
- Klein 4B distilled version runs successfully with 4-step generation, and at least one of the two paths has been run
Step 6 (optional): Run the Product Mockup
Why: One design draft plus one product photo — the Product Mockup template already wires up both reference images, making it a direct application for e-commerce scenarios.
How: Search the template library for Product Mockup and pick "Product Mockup(FLUX.2 Dev FP8)" (template name image_flux2_fp8, requires 0.4.0 or later). Two input images: image_flux2_input_Illustration.png (node 46, the design draft) and image_flux2_input_ref_image.png (node 42, the product photo).
The prompt is already filled in:
Apply the design from Reference Image 1 onto objects in Reference Image 2.This template's model configuration differs slightly from step 2: the text encoder is the fp8 version mistral_3_small_flux2_fp8.safetensors (16.8GB), the VAE is flux2-vae.safetensors (320.6MB), plus a Turbo LoRA Flux2TurboComfyv2.safetensors (2.57GB, with the "Enable 8steps LoRA" switch off by default). 20 steps, 1024×1024.
What you should see: The pattern from the design draft applied onto the physical product in the product photo, with the composition and the product's geometry preserved — the official tutorial positions this template for product mockups like packaging and mugs.
For the full e-commerce workflows (background swap, virtual try-on, product videos), see Product Mockup.
- (Optional) Take what each reference image offers: the design draft's pattern + the product photo's shape both appear in the output
Checkpoints ✅
- Got the Dev multi-reference workflow running: template + the three components + the ReferenceLatent chain
- Can write the three-part descriptive prompt structure: new object + position + parts to keep (
Keep the face) - Can explain the CLIPLoader change: FLUX.2 uses a single encoder + type
flux2, no longer DualCLIPLoader - Got the Klein 4B distilled version producing images in 4 steps
- (Optional) Got the Product Mockup running: the design draft's pattern + the product photo's shape both appear in the output
Pitfall warnings
❌ Downloaded the wrong VAE file: the official tutorial page and the template notes are inconsistent
The VAE listed under Model links on the official tutorial page is flux2-vae.safetensors, but the VAELoader in the FLUX.2 Dev template (image_flux2) actually specifies full_encoder_small_decoder.safetensors.
- Symptom: you downloaded the 320.6MB
flux2-vae.safetensors, but the file the template needs doesn't show up in theVAELoaderdropdown - Correct approach: for the download list, go by the Model links note inside the template canvas — the Dev template uses
full_encoder_small_decoder.safetensors(238MB), whileflux2-vae.safetensorsis reserved for the Klein and Product Mockup templates
❌ ComfyUI version too old, loading the template reports missing nodes
The FLUX.2 Dev family templates (image_flux2 / image_flux2_text_to_image / image_flux2_fp8) require 0.4.0 or later, and the Klein family templates require 0.3.72 or later — nodes like Flux2Scheduler and ReferenceLatent need the new comfy-core.
- Symptom: loading the template reports that nodes don't exist, or the run fails outright
- Correct approach: update ComfyUI first, then load the template
❌ Mixing Dev and Klein models
The two template families use completely different text encoders: Dev uses mistral (33GB scale), while Klein 4B uses qwen_3_4b (7.49GB). Even though the type for CLIPLoader is set to flux2 in both cases, the files are not interchangeable.
- Symptom: loading errors, or severely degraded image quality
- Correct approach: when switching templates, switch the models along with them. The two sets have different file names and can coexist in the same
models/directory — no need to delete back and forth
❌ Connected the reference image to the wrong ReferenceLatent input port
ReferenceLatent has two input ports: conditioning (the condition chain, coming from FluxGuidance or the previous ReferenceLatent) and latent (for the reference image's VAEEncode).
- Symptom: the reference image's latent wasn't connected to the latent port — this port is an optional input, so the workflow still runs without it; the run doesn't error out but the reference image has no effect at all (LATENT can't be connected to the conditioning port either; the type mismatch gets rejected outright)
- Correct approach:
LoadImage→ (scale) →VAEEncode→ the latent port; the conditioning port is only for the condition chain
Advanced tips (optional)
Turn on the Turbo LoRA: Dev 20 steps → 8 steps
The Dev template ships with an "Enable 8 steps lora" switch (off by default). Turn it on and sampling automatically loads the Flux_2-Turbo-LoRA_comfyui.safetensors downloaded in step 2, switching the step count from 20 to 8 — good enough for previewing composition; turn it off again for final output to run at 20 steps. Note that the same switch in the Product Mockup template uses a different LoRA file, Flux2TurboComfyv2.safetensors (from the Comfy-Org/flux2-dev repo) — don't mix up the downloads.
Write hex brand colors into the prompt
FLUX.2 supports brand color control down to hex color codes (one of the official key features). When creating brand materials, write the brand color's hex code directly into the description so the output color scheme doesn't drift — this is critical for cases like packaging and posters where "the colors must match the VI manual."
Klein also comes in 9B
Beyond 4B, Klein also has 9B, likewise in base / distilled variants: the text encoder switches to qwen_3_8b_fp8mixed.safetensors (8.07GB), and the scheduler is likewise distilled 4 steps / base 20 steps. The 9B diffusion model is in the BFL repo, and the official notes say you must accept the agreement on the repo page before downloading. The latest generation of Klein has reached FLUX.3; see the next lesson.
Lesson summary
In this lesson you got two FLUX.2 workflows running. Where you stand now:
- ✅ Dev multi-reference workflow running: template → the three components in place → the ReferenceLatent condition chain → images in 20 steps
- ✅ Remember the node differences:
CLIPLoader(typeflux2) replaces DualCLIPLoader, andFlux2Schedulerhandles steps + width/height - ✅ Can write descriptive editing prompts: describe the final image +
Keep the faceto declare what to keep - ✅ Got the Klein 4B distilled version producing images in 4 steps, and know how to choose between base / distilled
- ✅ Can pick the right variant as needed: Dev for maximum quality, Klein distilled for speed, Klein base for fine-tuning
Key configuration fields recap:
| Field / Node | Recommended value | Notes |
|---|---|---|
CLIPLoader type | flux2 | FLUX.2 single-encoder loading method, shared by Dev and Klein |
Flux2Scheduler steps | Dev 20 / Klein distilled 4 / Klein base 20 | Steps follow the template; don't accidentally set the wrong tier |
FluxGuidance | 4 | Dev template default value |
| Sampler | euler (KSamplerSelect) | Default for each template |
| VAE file | Dev template full_encoder_small_decoder / Klein, Product Mockup templates flux2-vae | The file most easily downloaded incorrectly |
| Output size | Follows the input image (GetImageSize → empty latent + scheduler) | To change the size, change the input image first |
Next lesson preview
In the next lesson we run FLUX.3 Klein: the latest open-source FLUX running locally.
You will learn:
- FLUX.3 Klein's text-to-image and editing workflows with the same weights, no need to keep two separate models
- Scheduling tricks for the distilled version's 4–16 steps
<ref_image_N>prompt syntax for multi-reference tags- The boundaries of the FLUX Kommunity License (commercial use? fine-tuning and publishing?)
Appendix: source code references
Click to expand and view source code locations
Last updated: 2026-11-05 (ComfyUI v0.43.2)
| Content | File |
|---|---|
| FLUX.2 Dev official tutorial (multi-reference, Product Mockup, model links) | sources/comfyui/docs/tutorials/flux/flux-2-dev.mdx |
| FLUX.2 Klein official tutorial (4B/9B, base/distilled, performance data) | sources/comfyui/docs/tutorials/flux/flux-2-klein.mdx |
| Dev editing template JSON (this lesson's main focus) | sources/comfyui/repo-notes/templates/image_flux2.json |
| Product Mockup template JSON | sources/comfyui/repo-notes/templates/image_flux2_fp8.json |
| Klein 4B distilled template JSON | sources/comfyui/repo-notes/templates/image_flux2_klein_image_edit_4b_distilled.json |
| Template index (minimum ComfyUI version for each template) | sources/comfyui/repo-templates/templates/index.json |
Key nodes and configuration fields:
CLIPLoader: clip_name + typeflux2(replaces FLUX.1'sDualCLIPLoader)Flux2Scheduler: steps / width / height → SIGMAS (resolution follows the input image)ReferenceLatent: conditioning chains the conditions, latent takes the reference imageVAEEncode, multiple images can be chainedFluxGuidance: 4 (Dev template default)EmptyFlux2LatentImage: FLUX.2-specific empty latent (corresponding to FLUX.1'sEmptySD3LatentImage)