Nodes/bsz-cui-extras/BSZ Latent Fill
ComfyUI Node

BSZ Latent Fill

A blunt instrument for the four latent channels

By Beinsezii·Created 3 years ago·Updated 2 years ago· 27
BSZ Latent Fill
  • latent
  • LATENT
a0.0
b0.0
c0.0
d0.0

BSZ Latent Fill does exactly one thing: it takes a latent and overwrites all four channels with whatever four numbers you give it. Every pixel, every batch slot, replaced. It's the pack's most blunt tool, and its most honest use is debugging - finding out what a channel actually does in your model's latent space.

Why you'd reach for it

The latent isn't just four copies of a brightness value - each channel carries a different kind of information, and the only way to really know what channel two does in your VAE is to set it to a value and look at what decodes. This node is how you run that experiment. It's also how you craft intentionally weird starting latents: fill a latent with channel values you chose, sample from it at low denoise, and see what the model does with it.

Inputs

  • latent - the latent to fill.
  • a, b, c, d - the values for channels 0, 1, 2, and 3, each from -100.0 to 100.0 (defaults 0).

Output: a LATENT with every sample's four channels filled.

How it works

There's no math here - it literally calls fill_(a) on each channel tensor in place on a clone. All batch entries get the same values, which makes this a deterministic, reproducible tool. And because it operates on the raw samples, it works on any VAE's latent space; there are no SDXL-specific constants to trip you up.

Install & the honest warning

cd ComfyUI/custom_nodes
git clone https://github.com/Beinsezii/bsz-cui-extras

restart, or install via ComfyUI Manager. Pure Python, no dependencies.

The honest warning: filling all four channels with arbitrary numbers is a fantastic way to produce garbage. The VAE expects a specific, correlated structure in those channels; set them to values that don't match what it learned and you decode to noise or flat mush. The author files it under "advanced" for a reason. The productive way to use it: change one channel at a time from its natural value, decode, and build a mental map of what that channel means. That's the debugging session BSZ Latent Debug (same pack) is designed to pair with - debug tells you the min/max/avg of each channel, fill lets you probe them.

Categorybeinsezii/latent/advanced

Inputs (5)

NameTypeDefaultDescription
latentLATENT
aFLOAT0.0-100–100
bFLOAT0.0-100–100
cFLOAT0.0-100–100
dFLOAT0.0-100–100

Outputs (1)

NameTypeDescription
LATENTLATENT