Nodes/ComfyUI-Flux2KontextConditioner/Flux2 Kontext Conditioner
ComfyUI Node

Flux2 Kontext Conditioner

Flux2 image-edit conditioning node. Encodes up to 3 reference images with the Flux2 VAE and attaches them as reference_latents. Text is encoded via the Qwen3-8B text encoder (no vision tokens). Guidance embedding is baked into the conditioning for Flux2 CFG-distilled inference.

By KursatAs·Created 2 months ago·Updated 2 months ago· 1
Flux2 Kontext Conditioner
  • clip
  • vae
  • image1
  • image2
  • image3
  • conditioning
  • output_image1
  • output_image2
  • output_image3
  • latent
prompt
target_resolution1024
alignment16
upscale_methodlanczos
guidance3.5
system_prompt_modenone
image1_strength1.00
image1_resolution1024
image2_strength1.00
image2_resolution1024
image3_strength1.00
image3_resolution1024
vae_tilingfalse
custom_system_prompt
Categoryflux/conditioning

Inputs (19)

NameTypeDefaultDescription
clipCLIP
promptSTRING
target_resolutionINT1024256–2048Text-to-image workflow only. Sets the canvas size (in pixels) for the empty latent passed to KSampler when no VAE or images are connected. Has no effect when VAE is connected — each image slot uses its own image1/2/3_resolution instead.
alignmentCOMBO16Snaps resized image dimensions to the nearest multiple of this value before VAE encoding. 16 is the minimum safe value for the Flux2 VAE (16x spatial compression). Higher values enforce stricter dimension rounding, which may slightly reduce effective resolution but can improve compatibility with some samplers.
upscale_methodCOMBOlanczos5 options: lanczos, bicubic, bilinear, area, nearest-exact
guidanceFLOAT3.50–100Flux2 guidance scale baked into the conditioning. Controls how strongly the model follows the prompt. 3.5 is the recommended default. Higher values increase prompt adherence but may reduce naturalness.
system_prompt_modeCOMBOnoneWraps the prompt with a Qwen3 instruct chat template. Flux2 itself does not process or understand system prompts — however, since Qwen3-8B was trained with these templates, the wrapping can subtly shift the token distribution and influence the final conditioning. Effect is minor. 'none' passes the raw prompt directly.
vaeoptVAE
image1optIMAGE
image1_strengthoptFLOAT1.000–2Scales the encoded latent of image1. 1.0 = full influence. Lower values reduce the reference impact, higher values amplify it. Only active when VAE is connected.
image1_resolutionoptINT1024256–2048VAE encoding resolution for image1. Input image must be equal or higher resolution to benefit. Higher values increase VRAM usage. You may enable vae_tiling
image2optIMAGE
image2_strengthoptFLOAT1.000–2Scales the encoded latent of image2. 1.0 = full influence. Lower values reduce the reference impact, higher values amplify it. Only active when VAE is connected.
image2_resolutionoptINT1024256–2048VAE encoding resolution for image2. Input image must be equal or higher resolution to benefit. Higher values increase VRAM usage. You may enable vae_tiling
image3optIMAGE
image3_strengthoptFLOAT1.000–2Scales the encoded latent of image3. 1.0 = full influence. Lower values reduce the reference impact, higher values amplify it. Only active when VAE is connected.
image3_resolutionoptINT1024256–2048VAE encoding resolution for image3. Lower values reduce spatial detail in the latent. Higher values increase VRAM usage. You may enable vae_tiling
vae_tilingoptBOOLEANfalseEnable VAE tiling for this node only. Reduces VRAM during encoding at the cost of slightly slower processing. Does not affect global ComfyUI VAE settings.
custom_system_promptoptSTRING

Outputs (5)

NameTypeDescription
conditioningCONDITIONINGText + reference-image conditioning passed to KSampler.
output_image1IMAGEDebug: resized image1 after aspect-ratio scaling and alignment snapping. 1×1 black pixel if image1 is not connected. Not needed for generation — wire to a Preview Image node to inspect the resized input.
output_image2IMAGEDebug: resized image2 after aspect-ratio scaling and alignment snapping. 1×1 black pixel if image2 is not connected. Not needed for generation — wire to a Preview Image node to inspect the resized input.
output_image3IMAGEDebug: resized image3 after aspect-ratio scaling and alignment snapping. 1×1 black pixel if image3 is not connected. Not needed for generation — wire to a Preview Image node to inspect the resized input.
latentLATENTLatent passed to KSampler. Contains the VAE-encoded reference latent of image1 when VAE is connected, or an empty canvas latent sized by target_resolution when no VAE is connected.