Nodes/ComfyUI-EditUtils/EditUtils: Boogu Edit Text Encode lrzjason
ComfyUI Node

EditUtils: Boogu Edit Text Encode lrzjason

Prompt, Refs, and a Built-In Negative in One Node

By lrzjason·Created 7 months ago·Updated 16 days ago· 207
EditUtils: Boogu Edit Text Encode lrzjason
  • clip
  • vae
  • image1
  • image2
  • image3
  • mask
  • positive
  • negative
  • latent
  • custom_output
  • main_image
prompt
negative_prompt
ref_longest_edge1024
ref_resize_modelongest_edge

If you're editing with Boogu-Image and you want the least-friction path to a working graph, BooguEditTextEncode_EditUtils is the node. It's the Boogu flavor of this pack's "one-shot" encode pattern: wire in a CLIP, a VAE, a prompt, and up to three images, and it hands you a ready-to-sample positive and negative conditioning pair, a latent, and a handful of extras. No config nodes, no chained preparers, no dictionaries to assemble.

The inputs are the friendly part: clip, vae, and prompt are required; negative_prompt, image1/image2/image3, ref_longest_edge, mask, and ref_resize_mode are optional. It internally builds the Boogu config (same settings the config nodes produce - ref_crop: "pad", ref_upscale: "lanczos"), runs the encode, and gives you a positive and a negative conditioning straight out the front. You drop those into a KSampler (or whatever sampler you're running) and you're done.

Now the part that trips people up, because it's a deliberate design choice rather than a bug: the reference latents are attached to both the positive and the negative conditioning. Why? Boogu's edit recipe treats the reference as something the model should see on both sides of the CFG contrast - the author's source notes explain it as the refs canceling out under CFG in a way that keeps them from over-constraining the negative. The practical consequence is you should not also feed the negative conditioning a ClearRefLatents or a fresh text-only encode, or you'll be fighting the design. If you really want text-only negatives, that's what BooguModelConfig + the general EditTextEncode_EditUtils path is for.

The other outputs fill in the details when you need them. latent is the main image's reference latent - wire it into a VAEDecode to see the actual starting canvas, or use it if you're doing the crop-then-edit dance. main_image is the processed main reference as an image. And custom_output is the ANY bag containing negative_cond, ref_latents, vl_images, and vae_images - if you want to disassemble it yourself, BooguOutputExtractor_EditUtils will do it for you in one step.

Two honest limitations. First, negative_prompt starts empty, and if you leave it that way you get an empty-string encode for the negative - fine for CFG-1-ish editing, pointless if you were hoping the node would conjure a good negative for you. Second, mask only applies to image1, so multi-image masked editing still means going the ConfigPreparer route. For everything else, this is the Boogu node people actually reach for first. Install: Manager → "EditUtils", or clone lrzjason/ComfyUI-EditUtils into custom_nodes, restart. Model files are on you.

Categoryadvanced/conditioning

Inputs (10)

NameTypeDefaultDescription
clipCLIP
vaeVAE
promptSTRING
negative_promptoptSTRING
image1optIMAGE
image2optIMAGE
image3optIMAGE
ref_longest_edgeoptINT102416–4096Longest edge of the output latent
maskoptMASK
ref_resize_modeoptCOMBOlongest_edgelongest_edge vs area-based resize

Outputs (5)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
custom_outputANY
main_imageIMAGE