Nodes/Luminance Stack Processor/Latent Stack Processor (5 Stops)
ComfyUI Node

Latent Stack Processor (5 Stops)

Blending five exposure latents before you ever decode

By sumitchatterjee13·Created 12 months ago·Updated 11 months ago· 45
Latent Stack Processor (5 Stops)
  • latent_1
  • latent_2
  • latent_3
  • latent_4
  • latent_5
  • merged_latent
blend_modequality_aware
center_bias0.40
detail_preservation0.70

The Latent Stack Processor (5 Stops) is the fast lane version of the pack. Instead of merging five exposure images in pixel space with HDR math, it takes five already-VAE-encoded latents and blends them in latent space, before you ever decode. The pitch is speed plus built-in noise reduction - and both are real. Decoding five images and merging them is expensive; averaging five latents is cheap.

One honest caveat before you get excited: despite the name, this is not doing HDR radiance math. It's a smart weighted blend of exposure representations, biased toward the center EV0 latent (which is usually your cleanest frame). Think of it as an ensemble/denoise step that gives you one solid latent to decode, not a true scene-referred merge. If your goal is values above 1.0 that you can grade in Nuke, you still want the image-space processors plus the EXR export node. If your goal is a cleaner single decode, fast, this is your node.

How it works

Each of the five LATENT inputs is a dict containing samples, and the node blends them with one of six strategies:

  • quality_aware (default) - builds a 4-level Laplacian pyramid per latent and blends each frequency band independently, weighting by per-pixel quality (60% contrast, 25% saturation, 15% exposedness). Fine details get picked selectively, smooth areas blend evenly. This is the "tree leaves sharp, sky smooth" mode and it's what the author tuned hardest.
  • variance_adaptive - detects high-variance (inconsistent) regions and favors the center latent there, while using full dynamic-range blending in smooth areas.
  • weighted_center / strong_center - plain weighted averages that tilt hard toward EV0 for maximum noise reduction. strong_center is the cleaner-is-better option, at the cost of less dynamic range.
  • median_blend - per-pixel, drops the min and max latent and averages the middle three. Great at killing outliers, exactly what it says on the tin.
  • simple_average - equal weights on all five. Maximum dynamic range, maximum noise.

The center_bias (0.0–0.8) slider controls how much the center latent dominates; detail_preservation (0.0–1.0) tunes edge selectivity in the variance-adaptive mode.

Workflow and gotchas

The pattern is: VAE Encode each of five exposures → feed the five latents into latent_1 through latent_5 (EV+4 down to EV−4) → merged_latent out → VAE Decode. The node checks that all five latents match shape and throws if they don't, so keep your exposures at the same resolution. And the README's single most important latent-space tip: the center latent - latent_3, your EV0 - should be the best-quality image of the set, because every strategy leans on it as the reliability anchor.

Install is the same as the rest of the pack: ComfyUI Manager searching "Luminance Stack Processor", or cloning https://github.com/sumitchatterjee13/Luminance-Stack-Processor.git into ComfyUI/custom_nodes, then pip install -r requirements.txt and restart. Just remember what you're getting: a fast, denoised latent blend. For real HDR output, decode and hand the result to the 3- or 5-stop processor.

Categorylatent/luminance

Inputs (8)

NameTypeDefaultDescription
latent_1LATENTFirst exposure latent (e.g., EV+4)
latent_2LATENTSecond exposure latent (e.g., EV+2)
latent_3LATENTThird exposure latent (e.g., EV0)
latent_4LATENTFourth exposure latent (e.g., EV-2)
latent_5LATENTFifth exposure latent (e.g., EV-4)
blend_modeoptCOMBOquality_awareBlending strategy: quality_aware (multi-scale pyramid + quality metrics), variance_adaptive (spatial smoothing), weighted_center (favor middle), strong_center (heavily favor middle), median_blend (reduce noise), simple_average (equal weights)
center_biasoptFLOAT0.400–0.8How much to favor the center exposure (reduces noise, 0.0 = equal weights)
detail_preservationoptFLOAT0.700–1Detail preservation strength for variance_adaptive mode (higher = cleaner details like tree leaves)

Outputs (1)

NameTypeDescription
merged_latentLATENT