All models

ZITS

Image inpainting model that restores edges and lines first, then uses them to guide texture filling.

Diffusion and generative · 3,273 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

This diagram has 3,273 operations (55 KB) and is drawn when you ask.

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
101.2M
Operations
3,273
Framework
PyTorch
Recurrent
No
Published
IEEE TPAMI 2023
Cited by
75 (as of 29 October 2026)
Authors
Chenjie Cao, Qiaole Dong, Yanwei Fu
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
m21572
Graph hash
b63601616a88b565a9d913391315be693fd8e3ee3bd862b7a5961f4368135995
Skeleton hash
3b28e5919224ca83c6e4f032e7e71af874d31f05812dd0d8f805e5255c10522c
Architecture hash
749af21b76bd6dc5c169bf230ade4fa2c5f01da4d819425b55228f18e1c29501
Diagram SHA-256
a222f7bd31d0ff6387527c4ddd1b2ec4428862c5f63929cae882e5bbb9fa698e
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

ZITS++ is an image inpainting model: it fills the missing areas of a corrupted image. It is an improved version of the authors' conference model ZITS and keeps that model's separation of structure recovery from texture recovery.

A Transformer Structure Restorer (TSR) restores holistic structural priors at low image resolution, and a Simple Structure Upsampler (SSU) upsamples them to higher resolution. The restored structures are learning-based edges (L-Edges), wireframe lines and gradients, which the paper finds generally more effective than the other priors it studies. The texture network, Fourier CNN Texture Restoration (FTR), adopts Fourier convolutions from LaMa. It adds Large Kernel Attention (LKA) with K = 21. A Structure Feature Encoder (SFE) based on gated convolution extracts multi-scale features from the upsampled structures. These features are added to FTR layers through a residual addition with a zero-initialized trainable parameter (ZeroRA). A masking positional encoding encodes large irregular masks.

The paper's experiments cover Places2, Indoor, MatterPort3D, FFHQ and a newly collected HR-Flickr dataset. The repository releases a model_256 and a model_512, and recommends model_256 for images whose short sides are 256 or shorter.

Key idea. ZITS++ restores edges, lines and gradients with a transformer at low resolution, upsamples them, and adds them incrementally to a Fourier CNN texture network through zero-initialized residual addition.

  • ZITS++
  • ZITS-PlusPlus
  • image inpainting
  • incremental transformer
  • structural priors
  • high-resolution inpainting
  • ZeroRA
  • object removal
  • edge and line guided inpainting

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

Cite the paper

@misc{cao2023zitsimageinpaintingimproving,
      title={ZITS++: Image Inpainting by Improving the Incremental Transformer on Structural Priors}, 
      author={Chenjie Cao and Qiaole Dong and Yanwei Fu},
      year={2023},
      eprint={2210.05950},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2210.05950}, 
}