# dbolya/tomesd

Speed up Stable Diffusion with this one simple trick!

Repository: https://github.com/dbolya/tomesd
Canonical: https://ross.abutalabs.com/products/tomesd
Language: Python
License: MIT
License Family: permissive
Last push: 2023-11-29T23:04:55+00:00

## Health v2 (maintenance only)
Score: 21/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 89
- inputs: {"age_days": 1255, "days_push": 1008, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1404, forks 81 (observed 2026-08-28T04:04:38.009921+00:00)

## What it is
ToMe for SD is a Python/PyTorch library that speeds up Stable Diffusion image generation by merging redundant tokens in the underlying transformer blocks. It requires no training, works out of the box with any Stable Diffusion model, and reduces both inference time and memory usage with minimal quality loss.

## Use cases
- speed up stable diffusion image generation
- reduce gpu memory usage when generating images with stable diffusion
- make diffusion inference faster without retraining the model
- apply token merging to stable diffusion pipelines
- generate large images like 2048x2048 faster with stable diffusion

## When to choose
- you use Stable Diffusion and want faster generation with minimal quality loss
- you need to reduce VRAM usage during diffusion inference
- you want a training-free, drop-in optimization for any Stable Diffusion model

## When to avoid
- you need bit-exact identical outputs to the original model (merging is lossy)
- you use diffusion models other than Stable Diffusion
- you need actively maintained software with recent updates

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, machine-learning, stable-diffusion, gpu-computing
- domain: image-processing, deep-learning, artificial-intelligence
- platform: python
- tags: token-merging, diffusion-models, inference-optimization, pytorch, research-paper, gpu

## Member repositories
- dbolya/tomesd (main) score 21

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:38.009921+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:38:50.302551+00:00, confidence not recorded.
  - readme: https://github.com/dbolya/tomesd (fetched 2026-08-28T04:04:38.009921+00:00, sha 8c232e3dbc79)
  - registry_pypi: https://pypi.org/pypi/tomesd/json (fetched 2026-08-29T11:52:44.921375+00:00, sha 9c7c5a306731)
- Data as of 2026-08-30T08:39:29.467469+00:00.
