Lukutar POS Nodes
ComfyUI custom node pack: POS label composition and printing (ESC/POS graphic page) for Custom TPTCM60/112 kiosk printers.
ComfyUI-LukutarPOS
ComfyUI custom node pack for composing and printing labels on Custom TPTCM60 / TPTCM112 kiosk POS printers (60/112 mm thermal rolls, 203 DPI, ESC/POS graphic page mode).
A label is assembled as a pass-through chain — Canvas → Image → Text → Barcode → QR → … — then previewed, printed through the Windows RAW spooler, or saved as a raw ESC/POS byte stream. Everything is rasterized into a single 1-bit bitmap before printing (text, barcodes and QR included), so the preview is pixel-exact with the print.
Features
- Full label composition in millimetres with 9-grid anchors — no dot math.
- Stock presets from 60×20 up to tall stickers like 60×80 / 60×100 mm; labels taller than one graphic page print as consecutive page transfers (up to 4 pages ≈ 292 mm at 60 mm, 157 mm at 112 mm).
- Photo-ready image pipeline: contain/cover/stretch fit, tone controls and Floyd–Steinberg / Bayer / threshold dithering.
- Barcodes (CODE128, CODE39, EAN-13/8, UPC-A, ITF, CODABAR) and QR codes rendered straight into the bitmap.
- Optional raw ESC/POS start/end code around the print job — presets
(feed, total/partial cut, ...) or custom snippets typed as
ESC i,1B 69,GS V 00. - In-node pixel-exact preview, Windows RAW printing with quality/copies, or raw ESC/POS stream export.
Installation
ComfyUI Manager: search for Lukutar POS Nodes and install —
dependencies are resolved automatically.
Manually: clone into ComfyUI/custom_nodes and restart ComfyUI:
cd ComfyUI/custom_nodes
git clone https://github.com/Mistress-Lukutar/ComfyUI-LukutarPOS
Extra dependencies (segno, python-barcode, and pywin32 on
Windows) are in requirements.txt; torch, numpy and Pillow come with
ComfyUI. pywin32 is only needed for actual printing — composition,
preview and stream saving work everywhere.
Nodes
Menu category: Lukutar/POS. Element nodes take a LABEL and
return a new immutable LABEL, so draw order is just wire order and
any stage can be previewed.
| Node | Purpose |
|------|---------|
| Label Canvas | Start a label from a stock preset (60/112 mm rolls, incl. tall 60×80/60×100) or a custom dot size |
| Label Image | Dither one IMAGE frame into a mm box (fit modes, dither methods, tone controls) |
| Label Image Rotate | Turn an IMAGE batch so its orientation matches the label — auto aspect-ratio comparison or a fixed 90/180 |
| Label Text | Multiline TTF text with font/size/align controls |
| Label Barcode | 1-D barcodes with auto checksums and optional HRI text |
| Label QR Code | segno-rendered QR with selectable error correction |
| Label Line / Frame | Rectangle outline or filled block |
| Label POS Code | Build an ESCPOS snippet: action presets or a custom command field |
| Label Preview | In-node pixel-exact preview; pass-through LABEL + IMAGE out; the PNG carries prompt/workflow metadata |
| Print Label / Windows RAW | Print via the Windows RAW spooler (quality, copies, optional start/end code) |
| Save Label Stream / ESC-POS | Write the raw ESC/POS payload (same optional start/end code) to a file |
Start / end POS code
Print and Save take optional ESCPOS inputs that run before and
after the label payload — a feed, a cash-drawer kick, a cut. Wire
them from Label POS Code: pick a preset (none, initialize, feed,
total/partial cut, feed + cut) or choose custom and type the
commands. The custom grammar:
# comment to end of line ; second comment style
ESC i # total cut, typed like the manual writes it
1B 69 # the same cut as hex bytes
ESC x 2 # quality 2 — a lone digit is a parameter value
ESC d 04 # feed 4 lines — letters stay command characters
ESC p 00 19 FA # cash drawer kick
"PAID\n" # quoted text, \xNN / \n / \r / \t / \\ escapes
Tokens are whitespace-separated (several commands per line are fine);
ESC, GS, DLE, LF, CR, TAB, FF, BEL, CAN, NUL are
mnemonics (a mnemonic beats bare hex — FF is form feed, the byte is
0xFF), any other single character is its literal ASCII byte (a hex
value 0x0A–0x0F needs two digits or the 0x prefix), and everything
else must be quoted or hex.
Printer geometry (TPTCM60/112, manual rev 1.35)
| Model | Paper | Print width | Page height | Max label height | |----------|--------|-------------|-------------|------------------| | TPTCM60 | 60 mm | 448 dots | 585 dotlines | 2340 dotlines (292 mm) | | TPTCM112 | 112 mm | 832 dots | 315 dotlines | 1260 dotlines (157 mm) |
The printer model is inferred from the label width; ESC/POS follows the
graphic page mode subset of the printer manual (ESC FD raster
transfer + ESC FA print). A label taller than one graphic page is
split vertically into page-sized chunks, each sent as its own
ESC FD + ESC FA pair — the paper feeds continuously, so tall
stickers print seamlessly.
License
MIT. Bundled DejaVu fonts: see assets/fonts/LICENSE-DejaVuFonts.txt.
Barcode pattern tables derive from python-barcode (MIT).