Blend Latents π¦
Photoshop blending modes, but for the latents nobody sees
- latent_a
- latent_b
- mask
- latents
- previews
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 inlerp,bislerp,slerp(smooth transitions),add/subtract(combining noise),inject(b adds onto a, handy for adding texture),multiply/screen(darken/lighten), andcolorize(pull a's colors toward b). The weirder ones likeglow,pin light, andreflectare 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 totruewhen 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_previewonly 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.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_a | LATENT | β | |
| latent_b | LATENT | β | |
| operation | COMBO | 24 options: add, bislerp, color dodge, colorize, cosine interp, cuberp, +18 | |
| blend_ratio | FLOAT | 0.500.01β1 | β |
| blend_strength | FLOAT | 1.00-100β100 | β |
| maskopt | MASK | β | |
| set_noise_maskopt | COMBO | 2 options: false, true | |
| normalizeopt | COMBO | 2 options: false, true | |
| clamp_minopt | FLOAT | 0.00-10β10 | β |
| clamp_maxopt | FLOAT | 1.00-10β10 | β |
| latent2rgb_previewopt | COMBO | 2 options: false, true |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latents | LATENT | β |
| previews | IMAGE | β |