Skip to content
Projects

teimurjan/blazediff has 356 GitHub stars and 6 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-19 02:15 UTC. Last push 2026-11-16.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
Collecting history
in 15 days
Collecting history
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

Blazing-fast image diffing for JS, Rust and Python

Developer Tools

README.md

Original

BlazeDiff is a high-performance diff ecosystem. Originally built in JavaScript as a pixel-perfect image comparison library that's now about 7x faster than pixelmatch. Now, BlazeDiff has evolved into a comprehensive suite of blazing-fast diff tools including image comparison, image diff analysis deterministically + agent-in-the-loop verdict, object diffing, perceptual quality metrics, framework-agnostic UI renderers, and React components for visualizing differences.

Available Packages

Core Libraries

  • @blazediff/core-native - The fastest single-threaded image diff in the world (Rust + SIMD, 5.1-5.9x faster than odiff on 4K images)
  • @blazediff/core-wasm - WebAssembly build of the same Rust algorithm (wasm32 + v128 SIMD, about 6.8x faster than pixelmatch). For browsers, edge runtimes, and any wasm host.
  • @blazediff/core - Pixel-perfect image comparison (about 7x faster than pixelmatch)
  • @blazediff/interpret-native - Native Rust structured interpretation of a diff: what changed in each region, where, and how much - not just which pixels differ
  • @blazediff/object - High-performance object diffing with detailed change tracking
  • @blazediff/ssim - SSIM, MS-SSIM, and Hitchhiker's SSIM for perceptual quality assessment
  • @blazediff/ssim-native - Native Rust build of the same metrics plus perceptual SSIM (~15x faster than the JS port; ~4x for Hitchhiker's)
  • @blazediff/gmsd - Gradient Magnitude Similarity Deviation metric
  • @blazediff/milo-native - Native Rust MILO (Çoğalan et al. 2025), a learned perceptual metric that models visual masking. The authors' weights embedded, PyTorch parity, no PyTorch
  • @blazediff/milo-wasm - WebAssembly build of the same metric for browsers, edge runtimes, and any wasm host
  • @blazediff/codec-png-native - The blazediff-png Rust PNG codec for Node.js through N-API: spng-parity decode, libdeflate encode
  • @blazediff/codec-png-wasm - WebAssembly build of the same codec for browsers, edge runtimes, and any wasm host

Rust Crates

  • blazediff - The Rust crate powering @blazediff/core-native: block-based image diffing with SIMD (source)
  • blazediff-png - From-scratch PNG codec in Rust, single-threaded and SIMD-first, with byte-exact decode parity to libspng and faster on every fixture. Powers @blazediff/codec-png-native and @blazediff/codec-png-wasm (source)
  • blazediff-ssim - SSIM, MS-SSIM and Hitchhiker's SSIM in Rust, dependency-free and SIMD-vectorised, held to the reference MATLAB scripts through Octave (source)
  • blazediff-interpret - Structured region analysis for image diffs: classify what changed, not just where. Powers @blazediff/interpret-native (source)
  • blazediff-milo - MILO perceptual quality metric as a std-only SIMD CNN, multi-threaded, held to the authors' PyTorch outputs by test. Powers @blazediff/milo-native and @blazediff/milo-wasm (source)

Python Packages

Command Line Tools

  • @blazediff/cli - JS CLI with multiple algorithms (diff, GMSD, SSIM, MS-SSIM, Hitchhiker's SSIM)
  • @blazediff/agent - Agentic visual regression. Auto-discovers routes, captures deterministic screenshots, and hands ambiguous diffs back to your coding agent (Claude Code, Cursor, Codex) to judge.

UI Components

Quick Links

Installation

BlazeDiff packages are dual-published. Install from whichever registry fits your runtime.

# Node / Bun via npm
npm install @blazediff/core
bun i @blazediff/core

# Deno / Bun via JSR
deno add jsr:@blazediff/core
bunx jsr add @blazediff/core

# Rust via Cargo
cargo add blazediff

# Python via pip
pip install blazediff blazediff-ssim blazediff-interpret

Every package above is available on both registries except the test-runner adapters (@blazediff/vitest, @blazediff/jest, @blazediff/bun) and the UI libraries (@blazediff/ui, @blazediff/react), which remain NPM-only - the adapters augment each runner's Matchers types and the UI packages have browser-DOM and React type surfaces that JSR's publish-time slow-types check doesn't allow. Native-binary sub-packages under @blazediff/core-native-*, @blazediff/ssim-native-*, @blazediff/interpret-native-*, @blazediff/milo-native-* and @blazediff/codec-png-native-* are also NPM-only; Deno consumers resolve them transparently via npm: specifiers declared inside the parent package.

Performance

BlazeDiff delivers significant performance improvements across all components:

  • Native (Rust): 5.1-5.9x faster than odiff on 4K images (6.8-7.5x with the in-house PNG codec, BLAZEDIFF_PNG_ENABLED=1)
  • WASM: about 6.8x faster than pixelmatch in total time, 5-10x on 4K (browser, edge, any wasm host)
  • Image Pixel-by-Pixel (JS): about 7x faster than pixelmatch in total time (about 4x when it also writes a diff image)
  • SSIM (JS): ~30% faster than ssim.js, ~75% faster with Hitchhiker's SSIM
  • SSIM (Rust): ~15x faster again than the JS port (~4x for Hitchhiker's SSIM), from the same decoded buffers
  • Object Diff: ~7% faster than microdiff on average (up to 94% on identical arrays)

View Detailed Benchmarks - Complete performance data, test methodology, and hardware specifications.

Contributing

Contributions are welcome! Please see the Contributing Guide for details.

License

MIT License - see LICENSE file for details.

Algorithm Licenses

The @blazediff/ssim and @blazediff/gmsd packages implement perceptual quality metrics based on published research. See the licenses folder for detailed attribution and licensing information:

Acknowledgments

  • Image diffing built on the excellent pixelmatch algorithm
  • SSIM and MS-SSIM based on groundbreaking research by Zhou Wang, Alan C. Bovik, and colleagues
  • Hitchhiker's SSIM based on research by Venkataramanan, Wu, Bovik, Katsavounidis, and Shahid
  • GMSD based on research by Xue, Zhang, Mou, and Bovik

Built for high-performance difference detection across images and data structures