Code Matrix (ASCII)
Matrix rain, green phosphor and binary art — straight from your footage, no green screen needed
- images
- images
You know that "hacker" title card every tech YouTuber uses? The one that's just a photo of a person re-rendered as falling green glyphs? This node does that to your actual footage - offline, per-frame, no diffusion model involved. It's called CodeMatrixASCII (display name "Code Matrix (ASCII)"), it ships in the MSCH Nodes pack, and if you've ever wanted a Matrix-style intro, a binary-data aesthetic, or a dense ASCII portrait of a video frame, it's about as close to one button as this ecosystem gets.
How it works
Each input frame is rebuilt from a monospace glyph atlas. The node downscales the image into a grid of columns (default 140), measures the brightness of each cell, then picks a character from a dark-to-light ramp - so the "M" of the Matrix logo comes out as a dense character and the background as sparse punctuation. No clever vision model, no latent space: it's a luminance map rendered as text, which is exactly why it runs in real time even on long clips.
Three details matter before you tweak anything:
char_pick-by_brightness(default) maps every cell to a glyph ramp;randominstead scatters random characters above athreshold, which is the mode that genuinely looks like Matrix rain instead of an ASCII portrait.char_set-ascii_dense,ascii_simple,binary(pure 0/1, which reads great as a HUD) ormatrix(the katakana-style glyphs).customlets you type your own incustom_chars.color_mode-green,amber,cyan,white,custom, ororiginal, which tints the glyphs toward the source pixel color instead of a flat terminal color.
The inputs that actually matter
columns is the one knob that dominates the look: 140 (default) gives fine detail at 720p, and you'll want to drop toward 60–80 if you want big chunky glyphs that read from across the room. gamma and contrast retune the tonal mapping - crank contrast up if your ASCII portrait looks muddy. invert flips light and dark. bold fatten the strokes when it's too thin.
Two settings do the animation part, which is the reason you'd feed this a video rather than a still. flicker (0–1) randomly refreshes a fraction of the glyphs over time - this is what makes binary/matrix sets feel alive instead of frozen. threshold matters only in random mode. seed drives all the randomness.
Wiring it in
The single input is an images IMAGE batch; the single output is images again. So the flow is dead simple: Load Image or Load Video → CodeMatrixASCII → Save Video / Video Combine. If you feed one still image you get one still frame back - to get falling-glyph motion, either feed a frame batch from a video or combine flicker > 0 with frames from a batch. You can also run this mid-graph and composite the ASCII version over the original, since output frames line up 1:1 with input frames.
Install
It's one of 35 nodes in the unified MSCH Nodes pack - no separate install needed. In ComfyUI Manager search for "MSCH Nodes" / msch-comfyui-nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/mariobilly/msch-comfyui-nodes.git
cd msch-comfyui-nodes
python -m pip install -r requirements.txt
Restart ComfyUI afterwards. Code Matrix itself is plain Pillow/torch work, so it loads even when optional heavier components (lyrics, slideshow) are missing.
Gotchas
The trap most people hit: this node is frame-wise and knows nothing about timing or audio. It converts whatever IMAGE batch it gets, so your "video" is only as animated as the frames you feed it. Pair it with the beat/timing tools elsewhere in the pack (or any standard video pipeline) if you want the glyph rain to hit on the beat. And if your ASCII output looks like noise rather than a portrait, back columns up and check invert - a dark subject on a dark background inverts the ramp and turns the whole thing into a gray smear.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| char_set | COMBO | ascii_dense | 5 options: ascii_dense, ascii_simple, binary, matrix, custom |
| char_pick | COMBO | by_brightness | 2 options: by_brightness, random |
| custom_chars | STRING | 01 | — |
| columns | INT | 14016–600 | — |
| color_mode | COMBO | green | 6 options: green, amber, cyan, white, custom, original |
| custom_color | STRING | #33FF66 | — |
| background | STRING | #000000 | — |
| gamma | FLOAT | 1.000.2–4 | — |
| contrast | FLOAT | 1.000.2–3 | — |
| invert | BOOLEAN | false | — |
| threshold | FLOAT | 0.120–1 | — |
| flicker | FLOAT | 0.000–1 | — |
| bold | BOOLEAN | false | — |
| seed | INT | 00–4294967295 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |