DetikZify is a Python tool that synthesizes TikZ graphics programs from sketches and images, with model variants and adapters for text-conditioned generation. It provides a Python package installable via pip and example usage for programmatic generation and rendering.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
DeTikZify is a Python-based system that automatically synthesizes TikZ graphics programs for scientific figures and sketches, based on sketches and existing figures. It includes an MCTS-based inference approach to refine outputs without additional training.
How it works
The project offers a multimodal model and adapters (TikZero, TikZero+) to condition generation on text. It supports programmatic usage via a DetikzifyPipeline to load models and generate TikZ programs, with options to sample and evaluate multiple candidate programs. It also exposes a Python interface for loading models and running inference:
from detikzify.model import load
from detikzify.infer import DetikzifyPipeline
caption = "A multi-layer perceptron with two hidden layers."
pipeline = DetikzifyPipeline(*load(
model_name_or_path="nllg/detikzify-v2-8b",
device_map="auto",
torch_dtype="bfloat16",
))
fig = pipeline.sample(text=caption)
Getting started
Install with pip as shown in the README:
pip install 'detikzify[legacy] @ git+https://github.com/potamides/DeTikZify'
If using the v2 models only, the [legacy] extra can be removed. For editable install with examples:
git clone https://github.com/potamides/DeTikZify
pip install -e DeTikZify[examples]
Additionally, the package requires a full TeX Live 2023 installation, ghostscript, and poppler.
Usage tips point to the web UI for interactive use:
python -m detikzify.webui --light
Recent releases
Latest releases include:
- v0.3.0 (2025-07-07): DeTikZifyv2.5-8b model, default in HF Space.
- v0.2.1 (2025-03-19): TikZero adapters released.
- v0.2.0 (2024-12-04): DeTikZifyv2-8b model release.
- v0.1.0 (2024-11-20): Initial DeTikZify release.
Traction
Stars: 1807 Forks: 92 Open issues: 15
Caveats
License: Apache-2.0 Created: 2023-11-27 Last push: 2026-02-04 Notes: The README documents dependencies and installation steps, including system packages and optional local or Colab usage. No further caveats are listed beyond those dependencies and the need for TeX Live, ghostscript, and poppler.






