Nodes/ComfyUI XWAVE Nodes/XWAVE Histogram Glitch
ComfyUI Node

XWAVE Histogram Glitch

Per-channel curves that actually look like a glitch

By XWAVEart·Created about a year ago·Updated about a year ago· 2
XWAVE Histogram Glitch
  • image
  • IMAGE
r_modesolarize
g_modesolarize
b_modesolarize
r_freq1.0
g_freq1.0
b_freq1.0
r_phase0.40
g_phase0.30
b_phase0.20
gamma_val0.50

Most "glitch" nodes fake it with pixel sorting or channel shifting. XWAVE Histogram Glitch does something lazier and stranger: it applies a different mathematical curve to each of the three color channels independently, and because red, green and blue stop agreeing with each other, the image falls apart in a way that reads as genuinely broken. At the default settings you get wavy bands of rainbow inversion rolling across the image. It's one of those "I have no idea what I'm doing and I love it" nodes.

How it works

Each channel (R, G, B) gets its own mode from four options:

  • solarize - 0.5 + 0.5 * sin(freq * π * value + phase). A sine wave wrapped around the pixel values, so bright and dark regions periodically invert. freq sets how many inversion bands you get, phase slides them.
  • log - log(1+x)/log(2). Compresses the dynamic range, pulling details out of shadows.
  • gamma - x^gamma. Classic power curve; gamma_val under 1 brightens midtones, over 1 darkens them.
  • normal - passthrough. Leave that channel alone.

Because the modes default to solarize on all three channels but with slightly different phases (0.4 / 0.3 / 0.2), the waves land at different offsets per channel - that's the built-in rainbow banding at defaults. Set two channels to normal and you've got a single-channel tinting effect instead.

The inputs that matter

  • r_mode / g_mode / b_mode - the four modes above. This trio is the whole game.
  • r_freq / g_freq / b_freq (0.1–10) - solarization frequency per channel. Low = smooth waves, high = rapid inversions.
  • r_phase / g_phase / b_phase (0–6.28) - wave offset per channel. Full 6.28 rotates the cycle once.
  • gamma_val (0.1–3) - only used by channels in gamma mode.

Output is a single IMAGE, into Preview/Save or whatever's downstream.

Actually getting a good result

  • Defaults are a statement, not a look. All-solarize is wild; dial a couple of channels to normal and keep one solarize for a controlled effect.
  • Mix modes. Solarize red, log green, gamma blue is the README's suggestion and it delivers - it looks like a broken analog capture.
  • Match phases to tame the rainbow. Set all three phases equal and the waves stack instead of splaying; you lose the glitch but gain a moody tone curve.
  • freq is sensitive. 0.5–2 is where you live; 10 looks like crushed static.

Installing it

It's in ComfyUI XWAVE Nodes. ComfyUI Manager → search "XWAVE" → install ComfyUI XWAVE Nodes → restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/XWAVEart/comfyui-xwave-xlitch-nodes
cd comfyui-xwave-xlitch-nodes
pip install -r requirements.txt

Pillow, numpy, scipy - no models, no keys, pure CPU.

Gotchas

  • No overall blend/opacity control. The output is the transformed image, period. There's no "mix with original" knob, so pair it with a Blend node if you want subtlety.
  • Log mode can look washed out. log(1+x)/log(2) compresses hard, so a channel in log mode often ends up milky. That's the aesthetic, not a bug.
  • Gamma applies globally to gamma-mode channels. All channels in gamma mode share one gamma_val - there's no per-channel gamma. Annoying if you wanted R at 0.8 and B at 1.6, but that's what the mode options are for.

The pack is new and quiet - no community lore to lean on, so trust your eyes and the waveform. If it looks broken in the interesting way, it's working.

CategoryXWAVE/Color

Inputs (11)

NameTypeDefaultDescription
imageIMAGE
r_modeCOMBOsolarize4 options: solarize, log, gamma, normal
g_modeCOMBOsolarize4 options: solarize, log, gamma, normal
b_modeCOMBOsolarize4 options: solarize, log, gamma, normal
r_freqFLOAT1.00.1–10
g_freqFLOAT1.00.1–10
b_freqFLOAT1.00.1–10
r_phaseFLOAT0.400–6.28
g_phaseFLOAT0.300–6.28
b_phaseFLOAT0.200–6.28
gamma_valFLOAT0.500.1–3

Outputs (1)

NameTypeDescription
IMAGEIMAGE