BSZ Latent Offset XL
Push an SDXL latent toward black or white
- latent
- LATENT
Every latent-manipulation trick needs to know the same thing first: what does "black" and "white" actually mean in this VAE's latent space? BSZ Latent Offset XL is the node that answers it - it takes any SDXL latent and nudges it toward the VAE's real black or white, using baked-in channel values, on a single slider.
Why you'd reach for it
This is the "mood darkener / brightener" of the pack, done in latent space. You've sampled an image, it's the right composition but too dark or too washed out, and you want to shift the whole thing without a second generation or a decode/recolor/re-encode round-trip. Slap this between the sampler and the VAE Decode, drag offset a little toward -1 or +1, and the decoded image comes out darker or brighter.
It's also the conceptual bridge for the rest of the pack: the same hardcoded XL black/white constants are what the colored-latent node draws on, and the HueChroma node reuses the same latent-space model. Learn this slider and the siblings make more sense.
Inputs
latent- the SDXL latent to adjust.offset- one float, -1.0 to 1.0. 0.0 leaves it unchanged, -1.0 drives it to black, +1.0 to white. The step is 0.05, which is a good reminder that small nudges are usually what you want.
Output: a LATENT.
How it works
The math is refreshingly legible: scale all four channels down by (1 - offset), then add the hardcoded black-or-white channel values times offset. Positive offsets pull toward the white constants, negative toward black. Because those constants are derived from the SDXL VAE, the offset genuinely lands on what that VAE decodes as black or white - not on "middle gray pretending to be black," which is the trap the README warns about elsewhere in this pack.
Install & the XL caveat
cd ComfyUI/custom_nodes
git clone https://github.com/Beinsezii/bsz-cui-extras
restart, or install via ComfyUI Manager. Pure Python, no dependencies.
And the caveat is the name: it's an XL node. The constants are SDXL-VAE numbers, so on SD 1.5 or Flux this is not a "toward black/white" control at all - it's "toward whatever those channels mean there," which is usually nothing good. Stay in the XL ecosystem, keep offset small, and read it as a relative slider rather than an exact brightness target.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| offset | FLOAT | 0.00-1–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |