Dead Pixel Effect
Simulating Sensor Defects
- images
- IMAGE
Dead Pixel Effect exists for one purpose: to make your footage look like it came from a camera that's falling apart. It scatters dead, stuck, hot, and subpixel defects across your images - the kind of sensor damage you'd normally be trying to avoid. If you're making horror footage, analog-found-footage, VHS-adjacent content, or any "security cam that's seen better days" aesthetic, this is a fast way to get authentic-looking sensor rot without hunting for reference clips.
What separates it from just adding noise is the six defect modes. There's a real taxonomy here: dead pixels (permanently black), dead-white pixels, stuck-color pixels, hot pixels (random bright specks), single-channel subpixel defects (the kind that show up as colored dots on a real sensor), and clusters - the little patches of damage that happen when a sensor takes a hit. You pick the flavor, set the rate, and the node scatters them deterministically from a seed.
How it works
The node builds a boolean defect mask - defect_rate times total pixels, placed as blocks of cluster_size - and then applies the chosen defect mode to everything under the mask. Dead black sets those pixels to 0, dead white to 1, stuck color to a random color scaled by color_intensity, hot pixels to bright random values, and subpixel mode slams one RGB channel. All randomness flows from the seed, so the same seed and settings reproduce the exact same damage.
The flicker_rate slider is the subtle star. At 0, defects are static (correct for dead pixels - they don't move). Crank it up and a portion of defects are re-randomized per frame, which simulates hot pixels that shimmer - the thing that actually sells "broken sensor" in video.
The inputs that matter
defect_mode- the six-type dropdown.DEAD_BLACKandHOT_PIXELare the workhorses;SUBPIXELis the subtle "real camera" look;CLUSTERreads as physical damage.defect_rate(0.0001–0.1, default 0.001) - the density. At the default you get a handful of defects. 0.01+ starts to look trashed.cluster_size(1–10) - how big each defect blob is. Leave at 1 for the classic single-pixel look.flicker_rate- 0 for stills, higher for video.seed- reproducibility. Same seed, same dead pixels, every time.
Output is an IMAGE batch at the same resolution.
Installing it
Dead Pixel Effect is part of DJZ-Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Restart ComfyUI, or install via Manager (search "DJZ-Nodes"). OpenCV and numpy cover its needs; no models to download.
Common issues
The two traps are both about scale. defect_rate is a fraction of total pixels, so on a 1080p frame the default 0.001 means roughly 2,000 defects - which sounds like a lot but reads as a subtle sprinkle at that density. Bump to 0.01 on a big image and it becomes carnage, fast. Second, cluster_size combined with a high rate can overlap defect blocks and look like noise rather than damage - keep clusters small unless you specifically want the "dropped phone" patch look. And remember that dead pixels are supposed to be static: if you're doing video and your dead pixels drift around, flicker_rate is set too high.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| defect_mode | COMBO | 6 options: DEAD_BLACK, DEAD_WHITE, STUCK_COLOR, HOT_PIXEL, SUBPIXEL, CLUSTER | |
| seed | INT | 00–18446744073709550000 | — |
| defect_rate | FLOAT | 0.00100.0001–0.1 | — |
| cluster_size | INT | 11–10 | — |
| color_intensity | FLOAT | 1.00–1 | — |
| flicker_rate | FLOAT | 0.00–1 | — |
| subpixel_mode | COMBO | 4 options: RED, GREEN, BLUE, RANDOM |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |