Nodes/Eric_Krea2/Eric Krea2 VAE Encode
ComfyUI Node

Eric Krea2 VAE Encode

The img2img entry ticket

By EricRollei·Created 2 months ago·Updated about a month ago· 11
Eric Krea2 VAE Encode
  • krea2_pipeline
  • image
  • encode_vae
  • latent

img2img on Krea 2 starts here. Eric Krea2 VAE Encode takes an IMAGE, runs it through the pipeline's Qwen-Image VAE, and hands you a KREA2_LATENT - the packed latent the Multi-Stage Ultra node expects on its init_latent input. That one wire is the difference between "generate from nothing" and "re-denoise from this picture."

The one pattern to know

The README's img2img section is a two-line recipe, and it's worth internalizing because it's unlike SD:

Load Image → Eric Krea2 VAE Encode → (init_latent) Multi-Stage Ultra
                     └→ Eric Krea2 Resolution (image) → width/height → Multi-Stage Ultra

The important conceptual shift: denoise strength is the step window, not a float. Stage 1 re-noises the init_latent at s1_start_step and denoises the [s1_start_step, s1_end_step] window. So you don't dial "0.5 denoise" - you choose how deep into the schedule the stage starts. Feed width/height from the Resolution node (or turn on init_match_size) so Stage 1 matches the source image's size, and the prompt still does the talking.

Required inputs are krea2_pipeline and image; output is latent (KREA2_LATENT). That's the minimal schema - two wires in, one out.

The optional that's worth understanding

encode_vae lets you encode with a Wan-family VAE instead of the pipeline's Qwen-Image VAE. It works because Krea 2/Qwen-Image and Wan 2.1 share an identical latent space - same latents_mean/std - so a Wan VAE encodes into the same space. Why bother? To match the grain of an alternate decode VAE: encode and decode with the same Wan decoder and you get a consistent look, instead of a Qwen-encode-then-Wan-decode mismatch. It's the img2img side of the same grain swap the VAE Decode node does on the way out.

There's also a quiet robustness detail in the source: if an unload node emptied the loader's cached pipeline dict, VAE Encode detects the None pipe and recovers it through the same path the Multi-Stage node uses, instead of throwing a cryptic error at you. You can unload models between runs without this node falling over.

Install

It's part of the Krea2_ComfyUI_Advanced pack (Eric Hiss / EricRollei):

cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Krea2_ComfyUI_Advanced

Restart (or ComfyUI Manager, searching the pack title). The pack needs the diffusers build with Krea2Pipeline installed from source (--force-reinstall), plus Krea 2 weights in diffusers layout.

Where it bites

Structure comes from img2img, content comes from the prompt (or a Vision Prompt). If you're expecting the reference image to dictate what gets drawn, that's the wrong channel - the latent only provides the starting structure. And every encode-decode round trip costs a little detail, so don't chain passes casually. Keep the source at the resolution you actually want to start from; encoding then stretching is how you invite softness.

CategoryEric/Krea2

Inputs (3)

NameTypeDefaultDescription
krea2_pipelineKREA2_PIPELINE
imageIMAGE
encode_vaeoptKREA2_DECODE_VAEOptional alternate VAE to encode with instead of the pipeline's Qwen-Image VAE. Krea2/Qwen-Image and Wan 2.1 share an identical latent space (same latents_mean/std), so a Wan-family VAE encodes into the same space - use it to match the grain of an alternate decode VAE.

Outputs (1)

NameTypeDescription
latentKREA2_LATENT