Nodes/Power Noise Suite for ComfyUI/Blend Latents 🦚
ComfyUI Node

Blend Latents 🦚

Photoshop blending modes, but for the latents nobody sees

By WASasquatchΒ·Created 3 years agoΒ·Updated 2 years agoΒ· 81
Blend Latents 🦚
  • latent_a
  • latent_b
  • mask
  • latents
  • previews
β—„operationβ–Ύβ–Ί
β—„blend_ratio0.50β–Ί
β—„blend_strength1.00β–Ί
β—„set_noise_maskβ–Ύβ–Ί
β—„normalizeβ–Ύβ–Ί
β—„clamp_min0.00β–Ί
β—„clamp_max1.00β–Ί
β—„latent2rgb_previewβ–Ύβ–Ί

Blend Latents is what happens when you take every blending mode your image editor ever shipped - multiply, screen, overlay, dodge, difference, and about eighteen more - and apply them to latent tensors instead of pixels. You feed it two LATENTs and pick an operation, and out comes a third latent that's a combination of the two, ready for a sampler or for further blending.

Why would you blend in latent space instead of doing it to images? Because you avoid the decode-encode round trip, which costs you a lossy VAE cycle every time. The Power Noise Suite philosophy is that if you're going to start a generation from noise anyway, you should be able to sculpt that noise - and blending two noise latents is how you get "the structure of this one, the texture of that one" without ever touching pixel space. It's also how you mix an img2img source latent with a fresh noise latent to control how much of the original survives.

Inputs and outputs

The two latents, latent_a and latent_b, have to be the same shape - the node asserts it and will error if they're not. Then:

  • operation - the big list. You'll live most of your life in lerp, bislerp, slerp (smooth transitions), add/subtract (combining noise), inject (b adds onto a, handy for adding texture), multiply/screen (darken/lighten), and colorize (pull a's colors toward b). The weirder ones like glow, pin light, and reflect are there if you want the chaos.
  • blend_ratio - the mix amount between a and b (0 to 1). This is the fader.
  • blend_strength - how hard the chosen mode hits. Negative values invert the effect, which the README calls out as an "interesting blend."
  • mask - an optional MASK so the blend only happens in part of the latent. This is the pro move: blend a noise latent into your img2img source everywhere except the face, say.
  • set_noise_mask - set to true when you're using a mask and want to pass it along as the sampler's noise mask, so the KSampler only denoises the region you blended.
  • normalize, clamp_min, clamp_max - tidy the output range so the result stays sane for the model. latent2rgb_preview only affects the preview, not the actual blend.

Outputs: latents (wire to a sampler) and previews (an IMAGE, useful because you cannot tell what a latent blend looks like by squinting).

The workflow this unlocks

The classic use: two different noise latents, blended 50/50, fed to a KSampler at low denoise - you get the emergent structure of both noise fields in one image. The Power Noise Suite's own sampler even reuses these same blend functions internally, so the modes you learn here are the same ones doing the work inside Power KSampler Advanced.

Install

Part of Power Noise Suite - one install gets you every node in this pack. ComfyUI Manager β†’ search "Power Noise Suite", or:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/PowerNoiseSuite

Restart. No models, no downloads; dependencies are just torch, which you already have.

Troubleshooting

The one failure mode you'll actually hit: mismatched shapes. If latent_a and latent_b came from different resolutions, the assert fails with a clear message - resize one of them first. And if you're blending an encoded latent (from a real VAE encode) with a raw noise latent, the two live in different value ranges and the result will be mush; keep both inputs the same kind of latent. normalize can rescue a bad range, but it's not a substitute for feeding it comparable inputs.

CategoryPower Noise Suite/Latent/Adjustements

Inputs (11)

NameTypeDefaultDescription
latent_aLATENTβ€”
latent_bLATENTβ€”
operationCOMBO24 options: add, bislerp, color dodge, colorize, cosine interp, cuberp, +18
blend_ratioFLOAT0.500.01–1β€”
blend_strengthFLOAT1.00-100–100β€”
maskoptMASKβ€”
set_noise_maskoptCOMBO2 options: false, true
normalizeoptCOMBO2 options: false, true
clamp_minoptFLOAT0.00-10–10β€”
clamp_maxoptFLOAT1.00-10–10β€”
latent2rgb_previewoptCOMBO2 options: false, true

Outputs (2)

NameTypeDescription
latentsLATENTβ€”
previewsIMAGEβ€”