Nodes/ComfyTV/Glitch FX
ComfyUI Node

Glitch FX

Broken-pixel chaos that's actually tunable

By jtydhr88·Created 3 months ago·Updated about 17 hours ago· 725
Glitch FX
  • video
  • video
force_run_token0
project_id
parent_output_id0
chance0.50
block_h0.20
shift0.20
color_intensity3
seed7

The glitch look - corrupted pixel blocks, offset color channels, the VHS-adjacent disintegration every music video since 2015 has used - is one of those effects people assume is hard to control. It's not, and Glitch FX proves it. It tears your video into horizontal slices, shifts them, and smears the color channels, all on a probability dial so you can go from "subtle digital hiccup" to "full signal collapse."

ComfyTV is jtydhr88's canvas app (~190 stages, each its own node), and this is one of its VideoFX workhorses. If you've got a clip that's too clean, this is the fastest way to give it an attitude.

How it works

Like the rest of ComfyTV's FX stages, Glitch FX doesn't decode and re-encode your video itself - it attaches an "fx spec" to the video wire that a downstream renderer (usually an FX Chain) applies in a single pass. The effect itself is deterministic chaos: per frame, a random slice of the image (a horizontal block whose height is block_h) gets shifted sideways by shift, and the color channels get separated by color_intensity. The seed makes that randomness reproducible - bump the seed to roll a new glitch pattern.

Three settings do most of the work:

  • chance (0–1, default 0.5) - probability a given frame glitches. This is your "how broken does it look" dial. 0.2 is tasteful; 0.5 is a steady disturbance; 1.0 is constant damage.
  • block_h (default 0.2) - the height of the corrupted block as a fraction of frame height. Small values = thin scanline tears; large values = chunks of the frame sliding off.
  • shift (default 0.2) - how far a block gets displaced. Crank it and the image starts to tile.
  • color_intensity (0–4) - how much the RGB channels separate. 0 kills the color fringing; 3 (the default) is the signature look.

Optional video in, video out. No video in, nothing happens.

The hidden inputs, explained once

Every ComfyTV stage carries force_run_token, project_id, and parent_output_id, all marked "Internal" in the schema. The frontend's projectStore fills them so each node can Run on its own and downstream nodes consume a snapshot of the last output. You never set them by hand - this is true of every stage in the pack, not just this one.

Installing it

Same pack, same steps:

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

or ComfyUI Manager ("ComfyTV"), full backend restart, then ComfyTV → VideoFX. The one gotcha that bites people: on ComfyUI Desktop, macOS, or multiple installs, clone into the running instance by absolute path and confirm custom_nodes/ComfyTV/__init__.py exists (not nested), then fully restart. The pack declares no pip deps, but video stages lazily import PyAV - pip install av if a video node errors.

Common issues

  • Everything looks smashed - chance and shift are both too high. Back chance to 0.2 first; that alone makes it readable.
  • No color fringing - color_intensity is 0. That's the setting that makes glitch read as glitch.
  • The glitch looks identical every run - same seed, same glitch. That's by design; change the seed.
  • Blocks fly off-screen and look broken, not stylish - shift is past the sweet spot. 0.2 is a good default; you rarely want it much above 0.4.
CategoryComfyTV/VideoFX

Inputs (9)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
chanceFLOAT0.500–1
block_hFLOAT0.200.01–1
shiftFLOAT0.200.01–1
color_intensityINT30–4
seedINT70–99999
videooptCOMFYTV_VIDEO

Outputs (1)

NameTypeDescription
videoCOMFYTV_VIDEO