AFP-GIC: Controllable Generative Image Compression

One pretrained model, five bitrate operating points. AFP-GIC adapts transferred visual knowledge to image content for natural-looking reconstruction at very low bitrates, without transmitting the fused prior.

Official pretrained weights for Adaptive Fused Prior Transfer for Controllable Generative Image Compression, by Yifei Pei, Ying Liu, and Nam Ling, published in IEEE Access (2026).

Paper | arXiv | Code | Live Demo | Reproducible Capsule

Try It

Upload your own image in the Hugging Face Space, select an operating point, compress, and decompress the downloaded bitstream. The public demo runs on CPU by default.

This model repository hosts the original release checkpoint. Inference uses the project's custom PyTorch/CompressAI implementation, not a Transformers pipeline or AutoModel.

Download and Evaluate

Set up the official inference code:

git clone https://github.com/yifeipet/AFP_GIC.git
cd AFP_GIC
conda create -n afp-gic python=3.9 -y
conda activate afp-gic
python -m pip install -r public_release/requirements.txt
python -m pip install huggingface_hub

From the repository root, download the weights into the location expected by the evaluation script:

from huggingface_hub import hf_hub_download

hf_hub_download(
    repo_id="yifeipet/AFP-GIC",
    filename="afp_gic_release.pth.tar",
    local_dir="checkpoint/afp_gic_release/model",
)

Place the 24 original Kodak PNG images in datasets/kodak/, then run:

python public_release/test.py -d cuda:0 --dataset kodak --qualities 0 1 2 3 4

Use -d cpu for CPU execution. Install a PyTorch build appropriate for your hardware, keeping the release's pinned versions. See the GitHub instructions for setup and metric protocols. Metric dependencies may download their weights on first use.

The checkpoint includes the frozen prior component; a separate AdaCode checkpoint is not needed. It is the original PyTorch checkpoint, not a converted or retrained model. Only load checkpoint files from trusted sources.

Operating Points

Quality index 0 1 2 3 4
Nominal target bpp 0.050 0.075 0.100 0.125 0.150

These are nominal targets, not guaranteed per-image bitrates. Actual bitrates depend on image content. All five operating points use the same pretrained model.

Evaluation Resources

Compared with DC-VIC, AFP-GIC uses 20.5% fewer inference parameters (120.6M versus 151.7M) and has 18.1% lower decoder latency (80.47 versus 98.27 ms). Measurements use an RTX 4090 and 100 DIV2K patches of 256 x 256 pixels, as reported in Table 5. These are not online-demo response times.

GitHub Releases provide 2,760 reconstructed images and associated metrics: 24 Kodak, 428 CLIC2020, and 100 DIV2K images at five operating points. These support baseline comparisons under matched evaluation protocols without rerunning the model.

The Code Ocean capsule performs fresh Kodak evaluation at all five operating points. IEEE artifact review is separate from capsule publication.

Scope and Limitations

This is a pretrained inference release, not a training release. Generative reconstruction is lossy and can synthesize inaccurate text or fine structures. Quality depends on image content and bitrate; improvements are not uniform across all metrics. Use the reported evaluation protocols when comparing results.

License and Attribution

The existing AFP-GIC license notice and third-party notices are retained. Original AFP-GIC additions are provided for research and evaluation use; third-party and derived components retain their applicable terms. This upload does not grant a new blanket MIT or Apache license over pretrained weights or third-party components. See the linked upstream projects for their terms.

Citation

@article{pei2026adaptive,
  title   = {Adaptive Fused Prior Transfer for Controllable Generative Image Compression},
  author  = {Pei, Yifei and Liu, Ying and Ling, Nam},
  journal = {IEEE Access},
  year    = {2026},
  doi     = {10.1109/ACCESS.2026.3737467},
  url     = {https://ieeexplore.ieee.org/document/11712133}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for yifeipet/AFP-GIC