Nodes/ComfyUI-nhknodes/Text Encode Flux2 Image Edit (nhk)
ComfyUI Node

Text Encode Flux2 Image Edit (nhk)

One Node for Flux 2 Klein Image Editing — Text Encode Flux2 Image Edit (nhk)

By Enashka·Created 12 months ago·Updated 28 days ago· 23
Text Encode Flux2 Image Edit (nhk)
  • clip
  • vae
  • image1
  • image2
  • image3
  • positive
  • negative
prompt

Text Encode Flux2 Image Edit (nhk) collapses the whole fiddly Flux 2 Klein image-edit encoding chain into one node: feed it a prompt, a CLIP, up to three reference images, and a VAE, and it hands you ready-to-sample positive and negative conditioning with the reference latents already attached. It's the node the pack author built for himself because unpacking the stock Klein edit workflow felt needlessly complex - and then shared it on r/comfyui in January 2026 with a "hopefully this helps others."

Context, because it matters: Flux 2 Klein is Black Forest Labs' size-distilled Flux 2, the ~9B variant that made the 32B monster actually runnable on consumer hardware. Klein's editing superpower is that it takes reference images as conditioning - you say "put this person in this scene" and the reference latents carry the identity. The stock workflow for that is a rat's nest of CLIPTextEncode + VAEEncode + ReferenceLatent nodes wired together. This node is that nest, boxed.

How it works

On execution it does three things in one pass:

  1. Encodes your prompt into the positive conditioning.
  2. Encodes an empty string into the negative conditioning - matching the original workflow's convention that Klein editing wants an empty negative.
  3. If a vae is connected and any of image1image3 are present, it scales each reference image down to roughly 1 megapixel, VAE-encodes it into a latent, and attaches all of them as reference_latents on both the positive and negative conditioning.

Then you sample as usual with a KSampler. The reference-latent attachment is the part that's easy to get wrong by hand, so having it baked in is the real value.

Inputs and outputs

  • clip - the model's CLIP (required). For Klein, the VLM-backed encoder.
  • prompt - multiline string (required), with dynamic prompts support.
  • vae - optional, but required for reference images to do anything.
  • image1, image2, image3 - up to three reference images (optional).

Outputs:

  • positive - CONDITIONING with your prompt and any reference latents.
  • negative - CONDITIONING from an empty prompt, with the same reference latents.

Installing it

Standard pack install:

cd ComfyUI/custom_nodes && git clone https://github.com/Enashka/ComfyUI-nhknodes

restart, or "NHK Nodes" from ComfyUI Manager. This node itself needs nothing extra - the heavy lifting is your Flux 2 Klein checkpoint and its VLM text encoder.

What to watch for

The "simplified" part means it takes the stock workflow's assumptions as gospel: the negative is always empty, reference images are always downscaled to ~1MP, and if you don't connect a vae, reference images are silently ignored - no error, they just don't attach. So wire the vae unless you're deliberately doing prompt-only generation. And it's a Klein-specific convenience: it assumes Klein's reference-latent conditioning API, so don't expect it to produce magic on a non-Flux model. If you're on the original 32B Flux 2 or Z-Image instead of Klein, you're better served by the stock nodes this one wraps. For Klein users, though, this is the one I'd reach for.

Categorynhk/conditioning

Inputs (6)

NameTypeDefaultDescription
clipCLIP
promptSTRING
vaeoptVAE
image1optIMAGE
image2optIMAGE
image3optIMAGE

Outputs (2)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING