ICEFConditioning~
Where the diptych becomes a real Flux Fill edit
- In_context
- negative
- vae
- diptych
- maskDiptych
- In_context
- negative
- latent
DiptychCreate builds the picture, InContextEditInstruction writes the prompt, and ICEFConditioning is the node in the middle that makes the whole trick physically happen. It takes the diptych, its mask, the text conditioning, and the VAE - and hands the sampler back the latents and conditionings it actually needs. Without this node, the ICEdit workflow is just a pile of disconnected wires.
Here's the mechanism, and it's worth understanding because it's what makes ICEdit cheap. ICEdit rides on Flux.1 Fill dev, BFL's inpainting model. Fill works by concatenation: the masked image gets encoded to latent and stuffed into the conditioning as extra channels, so the model sees the fixed context and only denoises the region you marked. This node does exactly that with a flourish - it takes the diptych, blanks out the right (masked) half down to gray, VAE-encodes that as concat_latent_image, and attaches it to both the positive and negative conditionings. The left half stays intact in the context; the sampler only generates on the white right half. It's Flux Fill's masked inpainting dressed up as instruction editing.
Inputs
Five inputs, all required, all wired from the obvious places:
- In_context (
CONDITIONING) - straight out of InContextEditInstruction. - negative (
CONDITIONING) - the workflow feeds aConditioningZeroOuthere. Flux doesn't do traditional CFG negatives, but the Fill conditioning path wants the pair, so zero it. - vae (
VAE) - the FLUX VAE (ae.safetensors), same one your VAEDecode uses. - diptych (
IMAGE) and maskDiptych (MASK) - both straight from DiptychCreate.
Outputs
It returns three things, and they all go into the same KSamplerAdvanced:
- In_context (
CONDITIONING) - your text conditioning, now carrying the concat latent. - negative (
CONDITIONING) - the zeroed one, same treatment. - latent (
LATENT) - the encoded diptych as the sample start, withnoise_maskset so generation only happens on the right half.
That last bit is the elegant part: no manual inpainting mask workflow, no "denoise strength" to babysit - the mask rides along inside the latent and the sampler just respects it.
Installing and running
Same install as the rest of the pack - ComfyUI Manager (search "ICEdit") or:
cd ComfyUI/custom_nodes
git clone https://github.com/hayd-zju/ICEdit-ComfyUI-official.git
Restart after. The nodes themselves have zero Python dependencies of their own; the README's prerequisite list (ComfyUI_essentials, ComfyUI-Easy-Use) exists for the bundled example workflows, not these nodes.
The real cost is the model. Flux.1 Fill dev is a 12B model - comfortable on 16GB+ VRAM (the project quotes roughly 14–18GB), and people do run it on 8GB cards by swapping in an FP8 fill checkpoint, an FP8 T5 encoder, and SageAttention, at the price of ~80 seconds per image. The ICEdit LoRA (regular_lora_weights.safetensors from RiverZ/ICEdit-normal-lora) loads via LoraLoaderModelOnly right after the UNETLoader.
Common issues
The one that trips everyone is the sampler's add_noise setting. With add_noise disabled, ICEdit tends to come out blurry or with the edit barely applied - the model never gets the noise it needs to actually redraw the right half. With it enabled at denoise 1, you sometimes get artifacts instead (one user's subject grew extra arms). The shipped workflow ships with add_noise enabled, and that's the setting to keep.
Also: the VAE encode/decode is lossy, and this pipeline is already doing one encode on the diptych. Don't add extra VAEDecode/VAEEncode passes of your source image before this node - feed the cleanest tensor you can and let ICEdit's single pass handle it. And if output looks washed out, check you're using the FLUX VAE, not an SDXL one.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| In_context | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| diptych | IMAGE | — | |
| maskDiptych | MASK | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| In_context | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |