All models

DA-Font

A few-shot font generator that renders a character in the style of a few reference glyphs.

Diffusion and generative · 304 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (29 KB)

Open in a new tab

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.3M
Operations
304
Framework
PyTorch
Recurrent
No
Published
ACM Multimedia 2025
Cited by
2 (as of 26 October 2026)
Authors
Weiran Chen, Guiqian Zhu, Ying Li and others
License
Apache-2.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m15517
Graph hash
ab41f51033dd1a92500f770446c9d5a6a0096502770a29814af33a55bf68b111
Skeleton hash
e66214e0bab55462f311f9bb6791845cf16a665a8f3f0b568dae49e0a09cba8d
Architecture hash
5a23381be1236e2acec182a168030a88945f9165cbd64c087753f6b3ed8fce04
Diagram SHA-256
f0b3b64d2387cb68a04849d9b986302ab82fa49a174bdc90940a990ac01e8ada
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

DA-Font is a model for few-shot font generation, the task of creating a new font from a limited number of glyph references. The paper notes that the results of existing methods often show visible defects, such as stroke errors, artifacts and blurriness.

DA-Font integrates a Dual-Attention Hybrid Module (DAHM) made of two attention blocks. The component attention block uses component information from the content images to guide the style transfer. The relation attention block then refines spatial relationships by letting the content feature interact with both the original and the stylized component-wise representations. Two added losses, a corner consistency loss and an elastic mesh feature loss, are designed to improve geometric alignment.

Training has two stages: the content encoder and a codebook are pre-trained based on VQ-VAE, and the font generation framework is then trained as a GAN. The discriminator separates real from generated images and also classifies the content and style categories of the generated characters. The paper trains and tests on a Chinese font dataset it collected, with 575 fonts of 3500 commonly-used characters each at a resolution of 128×128.

Key idea. DA-Font adds a Dual-Attention Hybrid Module, a component attention block and a relation attention block, to few-shot font generation, along with two losses for geometric alignment.

  • DA-Font
  • few-shot font generation
  • font generation
  • Dual-Attention Hybrid Module
  • DAHM
  • component attention
  • relation attention
  • corner consistency loss
  • elastic mesh feature loss
  • Chinese font

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{chen2025dafontfewshotfontgeneration,
      title={DA-Font: Few-Shot Font Generation via Dual-Attention Hybrid Integration}, 
      author={Weiran Chen and Guiqian Zhu and Ying Li and Yi Ji and Chunping Liu},
      year={2025},
      eprint={2509.16632},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2509.16632}, 
}