Nodes/ComfyUI_SD3_Flowedit/Flow Edit CFG Guider
ComfyUI Node

Flow Edit CFG Guider

The two-prompt guider that makes SD3 FlowEdit editing actually work

By raindrop313·Created 2 years ago·Updated 2 years ago· 6
Flow Edit CFG Guider
  • model
  • source_pos
  • source_neg
  • target_pos
  • target_neg
  • GUIDER
source_cfg3.50
target_cfg13.50

FlowEdit, the inversion-free editing idea that had a genuinely good run on Flux and LTXV in 2025, works in ComfyUI by splitting your prompt in two. Not "positive and negative" - two full tracks of conditioning, one describing what's in the image you loaded, one describing the edit you want, each with its own CFG. FlowEditCFGGuider is the node that holds both tracks together. Give it an SD3/SD3.5 model, four conditionings, and it hands back a GUIDER you wire into a SamplerCustomAdvanced. That's the whole pipeline's brain, right there.

Why you'd reach for it: ordinary img2img nudges your image through noise and back, and structure bleeds away on the trip - "change the clock tower to a lighthouse but keep the hill and the sky" becomes a coin flip. FlowEdit skips inversion entirely. Instead of running your image backwards to latent noise (DDIM inversion, slow and lossy), it builds an ODE that maps the source distribution straight onto the target one. The guider's job is to give that ODE its two reference points: a source description ("Big Ben on a hill") and a target description ("a white lighthouse on the same hill").

How it works, concretely: the pack's FlowEdit sampler runs the model twice per step - once on the interpolated source latent, once on the target - and tags each call with a latent_type in the transformer options. This guider subclasses ComfyUI's stock CFGGuider and reads that tag. Source pass gets source_pos/source_neg at source_cfg; target pass gets target_pos/target_neg at target_cfg. Simple mechanism, and it's why the default values look so alarming to anyone who's only tuned a normal KSampler.

The inputs that actually matter:

  • source_pos / source_neg - conditioning describing your input image. The negative is usually just an empty prompt.
  • target_pos / target_neg - conditioning describing the edit. Unlike distilled models, the target negative gets real work here: this pass runs genuine CFG, so "blurry, distorted" in the negative actually does something.
  • source_cfg / target_cfg - guidance for each track, default 3.5 and 13.5.
  • model - the SD3/SD3.5 model, patched by the pack's OutSD3ModelSamplingPred node first.
  • Output: GUIDERSamplerCustomAdvanced.

That 13.5 target CFG is the thing people bounce off first, and it's not a bug. On a normal model, CFG 13 torches the image. Inside FlowEdit it only shapes the target pass, which is fighting to rewrite the subject against a source pass that's holding the structure. If the edit isn't taking, push target_cfg up. If the output drifts from your source image - changes the hill when you only asked for the tower - raise source_cfg instead.

Install

The pack is three nodes that ship together, so ComfyUI Manager handles it: search ComfyUI_SD3_Flowedit and install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/raindrop313/ComfyUI_SD3_Flowedit

then restart ComfyUI. There are no model downloads and essentially no dependencies - requirements.txt lists a tiny einsum helper the code doesn't even import. You bring your own SD3 or SD3.5 checkpoint (the author's example uses SD3.5 Medium, and notes you can fine-tune for your own edit distributions). The code is a port of logtd's ComfyUI-Fluxtapoz, which is a good sign for how battle-tested the underlying algorithm is.

Common issues

  • Swapped conditionings. Wiring source_pos/target_pos backwards is the number one failure: your "edit" does nothing, or the whole image rewrites. Label the encode nodes.
  • It only works with the pack's sampler. This feeds a GUIDER into SamplerCustomAdvanced alongside the FlowEditSampler node. Drop it into a plain KSampler and nothing FlowEdit-y happens.
  • Missing T5. SD3.5 wants all three text encoders (CLIP-L, CLIP-G, T5-XXL) via TripleCLIPLoader. Skip T5 and the target track goes mushy and literal.
  • It's slow, on purpose. The model runs twice per step - roughly double a normal generation. That's FlowEdit's actual price; the inversion-free bit saves you the inversion, not the compute.
CategorySD3Flowedit

Inputs (7)

NameTypeDefaultDescription
modelMODEL
source_posCONDITIONING
source_negCONDITIONING
target_posCONDITIONING
target_negCONDITIONING
source_cfgFLOAT3.500–18446744073709550000
target_cfgFLOAT13.500–18446744073709550000

Outputs (1)

NameTypeDescription
GUIDERGUIDER