pxpipe: Cut Token Usage by Rendering Context as Images
Source: https://github.com/teamchong/pxpipe
Author: teamchong
Date: 2026-07-04
Summary (Chinese)
把 system prompt、tool docs 和历史对话渲染成 PNG 发给模型,利用“图像 token 成本由像素尺寸决定”实现 59-70% 成本削减。密集内容每个 image-token 包含约 3.1 字符 vs 文本 token 约 1 字符。Fable 5 上 10/10 读取准确,但标注了 lossy 限制:12 字符 hex 精确值在 Opus 上 0/15。
Summary (English)
Renders system prompt, tool docs, and conversation history as PNG images to reduce token cost by 59-70%. Dense content packs ~3.1 chars per image-token vs ~1 char per text-token. Fable 5 reads renders at 10/10 accuracy. Honestly notes lossy limitations: 12-char hex exact values scored 0/15 on Opus.
One-liner
把上下文渲染成图片压缩 token,59-70% 成本削减
*Imported from Obsidian digest notes on 2026-08-01. Content grounded in fetched source metadata via opencli.*