DocRes / DDC dewarping weights
Inference-only weights for the
comfyui-docres ComfyUI nodes.
These are not trained here — they are conversions of the checkpoints released
by the original authors, kept in safetensors form so they can be downloaded
without a pickle loader.
Files
| file | size | used by |
|---|---|---|
docres.safetensors |
58 MB | DocRes Restore — dewarping, deshadowing, appearance, deblurring |
mbd.safetensors |
227 MB | DocRes Restore — page mask for the dewarping task only |
ddc_fiducial1024_v1.safetensors |
51 MB | DDC Predict Points — control-point grid |
Sources and citations
docres.safetensors, mbd.safetensors
From DocRes — A Generalist Model Toward Unifying Document Image Restoration Tasks by Jiaxin Zhang, Dezhi Peng, Chongyu Liu, Peirong Zhang, Lianwen Jin, CVPR 2024. MIT licensed, © 2024 Jiaxin Zhang. Paper: https://arxiv.org/abs/2405.04408
Original checkpoints: checkpoints/docres.pkl and
data/MBD/checkpoint/mbd.pkl from the authors' release. They were published as
full training checkpoints containing an optimizer_state alongside the model
weights; those optimizer tensors are stripped here, which is what accounts for
the size difference. Tensor values are unmodified apart from removal of the
DataParallel module. prefix.
The page-mask network (mbd) comes from
MBD — Mask-Based Deepwarping
(Yuefei Gu et al.).
Backbone: Restormer (Zamir et al., 2021).
ddc_fiducial1024_v1.safetensors
From Document-Dewarping-with-Control-Points — Document Dewarping with Control Points by Guo-Wang Xie, Fei Yin, Xu-Yao Zhang, Cheng-Lin Liu, 2022. Paper: https://arxiv.org/abs/2203.10543 Code: https://github.com/gwxie/Document-Dewarping-with-Control-Points (MIT)
This is the authors' released ICDAR 2021 competition checkpoint
(2021-02-03 16_15_55flat_img_by_fiducial_points-fiducial1024_v1.pkl, from
Source/ICDAR2021/.../143/model_parameter). Same treatment as above: the
optimizer_state is dropped and the module. prefix removed. Verified to
produce bit-identical predictions to the original .pkl (max difference
0.000000).
Loading
from safetensors.torch import load_file
state = load_file("docres.safetensors") # keys have no `module.` prefix
Intended use
Document image restoration and page dewarping of scanned or photographed documents. Intended for research and general use; verify results before relying on them for archival or legal purposes.
License
MIT, following the upstream projects. See the linked repositories for the authoritative terms.