Nodes/bsz-cui-extras/BSZ Latent HSVA Image
ComfyUI Node

BSZ Latent HSVA Image

The HSVA flavor of 'encode a color into a latent'

By Beinsezii·Created 3 years ago·Updated 2 years ago· 27
BSZ Latent HSVA Image
  • vae
  • LATENT
h0
s0.00
v0.00
a0.50
width1024
height1024
batch_size1

BSZ Latent HSVA Image is the sibling of BSZ Latent RGBA Image, with the color inputs expressed as hue, saturation, and value instead of RGB. Pick a hue with the slider, decide how saturated and bright it is, set the alpha, and you get a latent filled with that color via your VAE.

Why you'd reach for it

If you think in "I want a deep teal starting latent" rather than "r=0.05, g=0.45, b=0.5," this is the more pleasant interface. Under the hood it converts your HSV values to RGB and hands off to the RGBA node - literally the same function - so you get identical behavior with input sliders your eyeball agrees with.

Inputs

  • vae - encodes the color into latent space; match it to your checkpoint.
  • h - hue, 0 to 360 degrees.
  • s - saturation, 0.0 to 1.0. 0 is gray.
  • v - value/brightness, 0.0 to 1.0. 0 is black.
  • a - alpha, 0.0 to 1.0; 0 returns a true empty (zero) latent, 1.0 is fully saturated color.
  • width, height, batch_size - same as EmptyLatentImage.

Output: a LATENT.

How it works

It converts h/360, s, v to RGB using Python's standard colorsys, then delegates to BSZLatentRGBAImage.generate - so the same VAE encode, the same alpha scaling, the same "mid-gray is not empty" caveat. The README's warning applies equally here: a v of 0.5 is not the same as the VAE's latent-space zero, so if you want a clean empty latent, use a = 0.

Install

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

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

When to pick this over RGBA

Honestly it's whichever your brain prefers. RGB is more precise for matching a hex-ish color; HSVA is better when you're experimenting with "what does the palette do if I sweep the hue from 0 to 360." One honest limitation: the hue slider steps by 5 degrees, so it's not the tool for pixel-perfect color matching - that's the RGBA node's job. It's a color-steering tool, not a colorimeter.

Categorybeinsezii/latent

Inputs (8)

NameTypeDefaultDescription
vaeVAE
hINT00–360
sFLOAT0.000–1
vFLOAT0.000–1
aFLOAT0.500–1
widthINT102416–16384
heightINT102416–16384
batch_sizeINT11–4096

Outputs (1)

NameTypeDescription
LATENTLATENT