TomePatchModel
The 2023 speed hack that's mostly retired now
- model
- MODEL
Let's start with the take, because the node deserves one: TomePatchModel was a genuinely clever speed trick for the SD 1.5 and SDXL era, and in 2026 it's mostly archaeology. It still ships in core, it still works, and there's exactly one situation where you'd reach for it - but it's not the default answer to slow renders anymore.
The technique is called ToMe (Token Merging), from the same research line that produced the popular tomesd library, and ComfyUI's node is a faithful port. The mechanism is elegant: in every self-attention layer, the tokens that carry redundant information get merged before attention runs, and then unmerged after. Specifically, the node finds the most similar token pairs in each attention block, averages each pair into a single token, runs attention on the smaller set, and restores the originals on the way out. With ratio at the default 0.3, you're cutting roughly 30% of the tokens out of every attention computation - and since attention cost scales quadratically with token count, that's a real chunk of time on the biggest layers.
The inputs
Two, and really one:
- ratio (default 0.3, 0–1) - fraction of tokens merged per layer. 0.3 is the community sweet spot; 0.5 gets faster but visibly softer detail.
- model - the model to patch.
MODEL out, straight to the sampler. It's a patch on attention only, so nothing else about your graph changes.
Why it fell off
The honest answer is that the thing ToMe optimizes stopped being the bottleneck. Modern transformer models (Flux, Wan, LTX, all the DiTs) already run with fp8, GGUF quant, and SageAttention-level optimized kernels, and the speedups that mattered on a 6GB card rendering SDXL in 2023 are rounding errors now. ToMe also has a quality tax - merging tokens does soften fine detail, and it's a tax that got less acceptable as quality standards rose. You'll notice the node has essentially zero presence in current workflows, and the community discussion has dried up to almost nothing. It's not broken; it's just no longer the lever.
When you'd still use it
If you're on an old or tiny GPU and rendering SD 1.5/SDXL UNet checkpoints, ToMe still delivers a real, free-ish speedup - ~20–30% at ratio 0.3 - for a quality cost most people can't spot at anime and illustration sizes. It slots in right after the loader and before the sampler, and it stacks with other speed tricks because it's attacking attention specifically. Just keep the ratio under 0.4, and know that the moment you move to a modern transformer model, this node is doing almost nothing for you.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| ratio | FLOAT | 0.300–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |