Leibniz
Leibniz provides a differentiable vector graphics rasterization loss.
It follows the DiffVG rasterization model described by Li, Lukáč, Gharbi, and Ragan-Kelley in Differentiable Vector Graphics Rasterization for Editing and Learning as a Rust crate.
Leibniz is not a general renderer. Its focus is the differentiable loss: comparing vector geometry in image space while preserving gradients back to curve parameters. It specializes DiffVG's model to linear and quadratic Bezier contour commands with solid grayscale fills under the nonzero fill rule. The implementation should be suitable for training models that emit vector geometry for type.
The reference implementation is BachiLi/diffvg. The package
treats that repository as the behavioral and mathematical reference, while
providing an idiomatic Rust API.
Backend
The only supported backend is Burn. Public APIs should be expressed in terms of Burn tensors and should return Burn tensor losses so autodiff can trace gradients through the rasterization computation. Other tensor or autodiff backends are out of scope.
Development
Run checks with the default Burn NdArray backend:
make check
make test