A ComfyUI custom node pack that embeds a playable Tetris game inside a node UI, with image outputs for the live board and next-piece preview.
- Live, playable Tetris inside the node UI
- Board image output and next-piece image output
- Score + lines-cleared tracking (not fully functional yet; current functionality is score = lines cleared)
- Pause/Play and Reset controls
- Seeded piece generation with a standard seed widget available
- Optional keybinding configuration via
TetriNode Optionsnode
Main gameplay node.
Inputs
tetrinode_options(TETRINODE_OPTIONS): Custom keybindings for moving left/right, rotating the piece, dropping the piece, play/pause, and resetseed(INT): Seed used for piece sequence
Outputs
image(IMAGE): current boardstate(STRING): serialized game statelines_cleared(INT)score(INT)next_piece(IMAGE): preview image
Optional node that provides keybindings.
Outputs
tetrinode_options(TETRINODE_OPTIONS): Custom keybindings for moving left/right, rotating the piece, dropping the piece, play/pause, and reset
Displayed inside the node UI and reflected in the game input handler.
- Move Left:
A - Move Right:
D - Rotate:
W - Drop:
S - Reset:
R - Pause:
P
Install via ComfyUI Manager. Search for "TetriNode" and click install. The node pack is also available on the Comfy Registry site by clicking here.
- Copy this repository into
ComfyUI/custom_nodes/TetriNode/. - Restart ComfyUI.
- Add
TetriNodeand (optionally)TetriNode Optionsfrom the node list.
MIT


