VQ-Font
Few-shot font generator that transfers reference styles onto components learned by vector quantization.
Diffusion and generative · 225 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 9.1M
- Operations
- 225
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICCV 2023
- Cited by
- 38 (as of 24 October 2026)
- Authors
- Wei Pan, Anna Zhu, Xinyu Zhou and others
- Source
- GitHub: awei669/VQ-Font
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m21299
- Graph hash
- 737d3bd701368e8c3d9e56809b4222b2407e48f5ca9568044af1abde7b0f0eb5
- Skeleton hash
- 706b5e6108695eed96ca36092c5961653078b8d20406e10dc11c8b04088bf4f2
- Architecture hash
- 37178735c6fed73cc2fb689c14476bc889a2dbea617eb239844bcb55c07eceb7
- Diagram SHA-256
- 6c28f29fac547ce96f6d1b90aa6446a88d987a3bdd465ba25ddc57ffb9df0f4e
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
VQ-Font is a few-shot font generator: given only a few reference glyphs in a target style, it produces new characters in that style. The name comes from vector quantization, which the method is based on.
Earlier component-based methods, the paper argues, usually need pre-defined glyph components such as strokes and radicals, which is infeasible across languages. VQ-Font instead learns its components as discrete latent codes through vector quantization, and a cross-attention module transfers the styles of the reference glyphs onto those components. A second, global style is aggregated from the references, weighted by how similar each reference is to the target character in content features.
The generator has five parts: a pre-trained content encoder, a reference style encoder, a local style aggregator, a global style aggregator and a decoder. The content encoder is kept frozen during font generation training. For Chinese the paper sets the component codebook size to 100. For English script the authors found that 15 codes were enough for good results.
Key idea. VQ-Font generates fonts from a few references by combining similarity-guided global style with local styles transferred onto components learned through vector quantization, without manual component definitions.
- vq-font
- vq font
- few-shot font generation
- font generation
- automatic few-shot font generation
- affg
- glyph generation
- chinese font generation
- vector quantization
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{pan2023shotfontgenerationtransferring,
title={Few shot font generation via transferring similarity guided global style and quantization local style},
author={Wei Pan and Anna Zhu and Xinyu Zhou and Brian Kenji Iwana and Shilin Li},
year={2023},
eprint={2309.00827},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2309.00827},
}