图像块错位故障 / Image Block Glitch
The no-model node that breaks your pixels on purpose
- image
- selection_mask
- image
- affected_mask
Most of the ComfyUI ecosystem is obsessed with making images cleaner - more detail, fewer artifacts, a face detailer to fix the fifth finger. Image Block Glitch is the opposite energy: it takes a finished image and deliberately slides horizontal strips of it sideways until it looks like a corrupted VHS tape or a dying monitor. It's the "let the pixels break a little" aesthetic that anime key visuals, poster art, and music covers have been leaning on for years, and it does the whole thing with zero model downloads and zero VRAM.
The name is also the mechanism. The node picks horizontal rectangular blocks inside a region you define, copies them, and pastes them back shifted left or right. That's the entire trick - the classic "block displacement" glitch, not a filter approximation of it. It ships from YudachiL/comfyui-image-block-glitch, and it sits firmly in ComfyUI's post-processing layer: a deterministic pixel operation, exactly the kind of thing the post-processing doc argues you should reach for instead of burning a diffusion pass. It even prints its intent on the tin - the README pitches it at 二次元 illustration, character art, posters, and covers.
The few inputs that actually matter
The node has a lot of knobs, but you'll set a handful and touch the rest rarely:
region_mode-coordinates(a plain x/y/width/height rectangle) ormask, where the optionalselection_maskinput defines an any-shape region. This is the selling point: draw a mask in the Load Image node's mask editor and the node only places blocks that fit fully inside the white area, preserving holes and avoiding odd shapes.block_count- how many glitch blocks it tries to place. Read that carefully: it's attempts, not guarantees.block_probabilityrolls for each candidate, and a crowded mask can skip blocks, so expect fewer than the number you type.block_width_min/maxandblock_height_min/max- block size in pixels. The defaults (48–240 wide, 4–24 tall) give you those thin horizontal slivers that read as "data tear."shift_min/max- how far each block slides sideways in pixels. Keepvertical_jitterat 0 for a pure horizontal glitch.seed- same image, same params, same seed, same result. It's deterministic per batch frame, so you can lock a look and iterate on other knobs.
The two outputs are image (your glitched frame) and affected_mask (a BHW mask marking exactly where blocks landed). Wire that mask into a compositing step to restrict a second effect to the glitched areas, or just drop image straight into a Save node.
The options worth knowing
hue_shift_enabled plus hue_shift_min/max rotate each block's hue by a random angle in that range - negatives work, so -120..120 with a probability of 0.7+ gives you the neon RGB-split look. allow_overlap decides whether blocks can stack on each other (the README's "neon" preset wants overlap on). opacity blends rather than hard-pastes, which is how you get subtle, partial corruption instead of a demolition. edge_mode is clip (trim blocks at the region edge) or wrap (wrap them around to the other side) - wrap is really a coordinates-mode feature, since mask mode always respects the mask's active area.
Install and gotchas
No models, no heavy deps - the node runs on PyTorch alone, which ComfyUI already has. requirements.txt lists only Pillow, and that's only used by the included standalone.py CLI, not the node itself. Install via ComfyUI Manager (search "Image Block Glitch") or:
cd ComfyUI/custom_nodes
git clone https://github.com/YudachiL/comfyui-image-block-glitch.git
Then restart ComfyUI and look for Image Block Glitch under image/effects. If you're feeling adventurous, the repo ships a standalone.py that runs the same effect from the command line without ComfyUI at all.
Where people trip: if you set region_mode to mask but leave selection_mask unplugged, the node hard-errors - it doesn't silently fall back to coordinates. And if a mask is too narrow or ragged, blocks silently stop appearing; drop block_width_min/block_height_min until they fit. For a classic horizontal glitch keep vertical_jitter = 0 and hue_shift_probability around 0.2–0.4; for full neon chaos go 30–60 blocks, overlap on, hue range -120..120. One caveat: this is a young, single-release pack (v1.0.0, mid-2026) with no community footprint yet, so don't expect forum wisdom if it misbehaves - but the source is clean, MIT-licensed, and the code does exactly what the README claims.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| region_mode | COMBO | coordinates | 2 options: coordinates, mask |
| region_x | INT | 00–16384 | — |
| region_y | INT | 00–16384 | — |
| region_width | INT | 5121–16384 | — |
| region_height | INT | 5121–16384 | — |
| block_count | INT | 240–500 | — |
| block_width_min | INT | 481–16384 | — |
| block_width_max | INT | 2401–16384 | — |
| block_height_min | INT | 41–4096 | — |
| block_height_max | INT | 241–4096 | — |
| shift_min | INT | 120–16384 | — |
| shift_max | INT | 1600–16384 | — |
| vertical_jitter | INT | 00–1024 | — |
| block_probability | FLOAT | 1.000–1 | — |
| allow_overlap | BOOLEAN | true | — |
| hue_shift_enabled | BOOLEAN | true | — |
| hue_shift_probability | FLOAT | 0.650–1 | — |
| hue_shift_min | FLOAT | -25-180–180 | — |
| hue_shift_max | FLOAT | 25-180–180 | — |
| opacity | FLOAT | 1.000–1 | — |
| edge_mode | COMBO | clip | 2 options: clip, wrap |
| seed | INT | 00–18446744073709550000 | — |
| selection_maskopt | MASK | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| affected_mask | MASK | — |