ComfyUI Node

Image To Emoji

Turn Any Image Into an Emoji Mosaic (Yes, Really)

By BetaDoggo·Created 2 years ago·Updated 2 years ago· 16
Image To Emoji
  • image
  • STRING
width100

Image To Emoji is the pack's party trick in a single node. Feed it any image, get back a string that's the image rendered as a grid of ⬜ and ⬛. No model, no API, no GPU involved - it's pure pixel math. It's also the engine behind the whole "video player" gimmick: every frame of a movie gets run through exactly this transformation. Standalone, it's the fastest way to get an "emoji version" of a generated image, and because the output is plain text, it survives anything - paste it in Discord, a markdown file, a terminal.

How it works

The node takes your image tensor, converts it to grayscale, and resizes it to your chosen width, preserving the aspect ratio. Then it computes the mean brightness of the whole image and uses that as a threshold: any pixel brighter than the mean becomes ⬜, anything darker becomes ⬛. The grid is joined into one string with newlines, which is your output.

That "mean as threshold" choice is the clever bit. Because the cutoff adapts to each image, a dark scene doesn't wash out to all-black and a bright one doesn't blow out to all-white - you always get roughly half-and-half contrast. It's not dithering, so it's blocky and crude by design, but it's reliably readable.

The two inputs

  • image - any IMAGE from anywhere in your graph. This is the only required connection.
  • width - grid width in emoji columns, 10–200, default 100. Height follows the aspect ratio, so a portrait image at width 100 gets very tall.

Output

A single STRING - the whole mosaic, rows joined with newlines. It's text, not an image, so don't try to wire it into an image input. It's made to be displayed: wire it into a ShowText node (from pythongosssss's ComfyUI-Custom-Scripts, which this pack assumes you have) or any text preview node, and you'll see the mosaic rendered with a monospace font. Font choice and size matter a lot here - with a proportional font the grid looks like garbage.

Install

Same as the rest of the pack - ComfyUI Manager (search "VideoPlayer") or:

cd ComfyUI/custom_nodes
git clone https://github.com/BetaDoggo/ComfyUI-VideoPlayer

Restart and you're done. The pack pulls in opencv-python on install; no models, no weights, no API keys.

The honest take

This is a novelty node, and that's the point of the pack - the author calls it "a silly POC" and the README's tagline is "1 step closer to replacing all software with comfy." Where people trip up: width 200 is the max but at that size a 4K image becomes a comically tall wall of text; and this node is strictly two-color black-and-white - the colorful 🟥🟨🟩 version lives in the pack's convert scripts, not in a node you can wire into a graph. If you want color emoji per frame, that's what AllInOnePlayer is for. If you just want to emoji-fy a single generated image for fun, this is the one - two inputs, one string, instant.

CategoryVideoPlayer

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
widthINT10010–200

Outputs (1)

NameTypeDescription
STRINGSTRING