HiVG  by ximinng

Vector graphics generation via hierarchical SVG tokenization

Created 1 month ago
694 stars

Top 48.7% on SourcePulse

GitHubView on GitHub
Project Summary

HiVG introduces a novel approach to scalable vector graphics (SVG) modeling through hierarchical tokenization, enabling the learning of compact visual programs. It targets researchers and developers seeking efficient and high-fidelity SVG generation from both images and text. The project offers a 3B parameter model that achieves state-of-the-art results, outperforming larger proprietary models on image-to-SVG tasks, while significantly compressing SVG sequences.

How It Works

The core innovation lies in a three-level hierarchical tokenization strategy: Raw SVG is first converted into Atomic tokens, which are then further compressed into Segment tokens. This method allows the model to learn more compact and efficient representations of visual programs, leading to a 2.76x sequence compression. This approach is advantageous for modeling complex vector graphics with fewer parameters and improved efficiency.

Quick Start & Requirements

  • Installation: Clone the repository (git clone https://github.com/ximinng/HiVG.git), navigate into the directory (cd HiVG), and install using pip (pip install -e .).
  • Prerequisites: Python environment. Model weights must be downloaded separately from HuggingFace.
  • Links:

Highlighted Details

  • Achieves frontier results with a 3B parameter model, outperforming 7/7 proprietary models including GPT-5 and Gemini 2.5 on image-to-SVG tasks.
  • Employs hierarchical tokenization (Raw SVG → Atomic tokens → Segment tokens) for 2.76x SVG sequence compression.
  • Enables high-fidelity image-to-SVG conversion, faithfully preserving structure, layout, and detail.

Maintenance & Community

No specific details regarding maintenance, community channels (e.g., Discord/Slack), or active contributors are provided in the README.

Licensing & Compatibility

This project is licensed under the MIT License, which permits commercial use and integration into closed-source projects.

Limitations & Caveats

Several advanced model variants, including instruction-tuned, Draw-with-Thought, and RL-based models, are listed as "Coming Soon," indicating that only the base model is currently available for direct use.

Health Check
Last Commit

1 month ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
346 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.