BSZ Latentbuster
The same code language, pointed at your latent instead of pixels
- latent
- LATENT
BSZ Latentbuster is the sibling of BSZ Pixelbuster with the target changed: instead of running its per-pixel program on image RGB, it runs it on the four channels of a latent tensor. The default program is a sepia filter applied in latent space, and that's the whole sell - you can write the same kind of shader-style code, but it operates before the VAE decode, on the compressed representation.
Why you'd reach for it
Latent manipulation normally means either hand-tuned sliders (the pack's HueChroma/Offset nodes) or the blunt fill tool. This node is the power-user option: arbitrary math over all four channels, per "pixel" of the latent. Combined with the pack's other latent nodes you can do color shifts, channel experiments, and weird transformations that no preset exposes. It's filed under advanced in the pack, and that's accurate.
Inputs
latent- the LATENT to process.code- the program. The default is a commented sepia latent filter: it switches to LCH, setsH = 180, multiplies chroma by 0.3, lightness by 1.3, and channel A by 1.15. A commented-out "latent rainbow" alternative (H = xnorm,H * 360) is right below it.e1…e9- external floats exposed as sliders your code reads ase1…e9.
Output: a LATENT.
How it works
Same Pixelbuster language as the image node - target operation source, channel letters, variables, coordinates, comparisons, jumps. The difference is the input mapping: the first three channels are treated as CIE L*a*\b* and the fourth as alpha, because, as the author puts it, CIE L*a*b is "surprisingly close to latent space." That's the key trick - LAB's lightness/chroma/hue axes are a reasonable stand-in for how the latent's first three channels behave, which is also why the pack's slider-based HueChroma node works at all.
The default sepia filter is worth understanding before you touch anything: H = 180 sets a fixed hue, then it desaturates and brightens. Decode the result and you'll see a warm, sepia-toned image - proof that this latent-space manipulation lands in pixel space the way you'd hope.
Install & gotchas
cd ComfyUI/custom_nodes
git clone https://github.com/Beinsezii/bsz-cui-extras
restart, or install via ComfyUI Manager. The prebuilt Pixelbuster native libraries ship in the repo - Linux .so, Windows .dll, macOS .dylib - so nothing to compile; the node just fails loudly with a pointer to the pixelbuster repo if the library doesn't load.
The honest caveat: "surprisingly close" is doing a lot of work. LAB is not latent space, so the mapping is approximate - expect results that are in the right family but not pixel-predictable. And the alpha channel is real alpha in this interpretation, so pushing a around does something to the decode that can surprise you. Start from the default sepia, understand it, then edit.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| code | STRING | # Initial colorspace is mapped to CIE L*a*b because it's surprisingly close to latent space # Sepia latent filter LCH H = 180 C * 0.3 L * 1.3 A * 1.15 # Latent rainbow # LCH # H = xnorm # H * 360 | — |
| e1opt | FLOAT | 0.00–1 | — |
| e2opt | FLOAT | 0.00–1 | — |
| e3opt | FLOAT | 0.00–1 | — |
| e4opt | FLOAT | 0.0-1–1 | — |
| e5opt | FLOAT | 0.0-1–1 | — |
| e6opt | FLOAT | 00–100 | — |
| e7opt | FLOAT | 00–100 | — |
| e8opt | FLOAT | 0-100–100 | — |
| e9opt | FLOAT | 0-100–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |