Adaptive Fused Prior Transfer for Controllable Generative Image Compression
Yifei Pei, Ying Liu, and Nam Ling. IEEE Access, 2026.
The five target labels are nominal operating points, not guaranteed per-image bitrates. Cached examples are labeled as paper examples and do not pretend to be live inference. Only live inference provides bitstreams and session timing. Standalone decompression reports dimensions, bitrate, and operating point, not reference-based quality metrics. It accepts this model's .afp files, not arbitrary archive formats. Uploaded entropy streams are parsed with size bounds. Live operations use a Gradio queue and, on ZeroGPU hardware, a GPU allocation limited to 120 seconds per request. Timing is not comparable to the paper's unified benchmark. Uploads retain their original resolution after EXIF orientation by default; optional Resize mode limits the longest edge to 1024, 1536 or 2048 pixels without upscaling. Metrics use the actual RGB encoder input, so resized results are not full-resolution quality comparisons. The demo accepts up to 12 MiB and 24 megapixels, with each dimension between 64 and 65535 pixels. Resource limits may prevent processing large images; there is no automatic downscaling. Inputs are converted to RGB; transparent pixels are composited over white. Results expire after one hour.
static/ and public_release/. Do not upload .venv or test artifacts.checkpoint/afp_gic_release.pth.tar. A separate model repository is optional.AFP_MODEL_REPO in Space Settings.
The default filename is afp_gic_release.pth.tar; change AFP_MODEL_FILENAME if needed.
Optionally pin AFP_MODEL_REVISION to a verified commit. For private model repos,
store a read-only token as the HF_TOKEN secret, never in source code.Alternatively, set AFP_CHECKPOINT to a checkpoint already present inside the container.
Only load your trusted release checkpoint. Do not accept user-supplied checkpoints.
No Space, model repository, paid hardware, or public upload is created by these files. Check Hugging Face's current account eligibility and hardware pricing before deployment.
Use Python 3.10 and the pinned deployment stack:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export AFP_CHECKPOINT=/absolute/path/to/afp_gic_release.pth.tar
python zerogpu_app.py
Run exactly one worker: the codec lock and admission control are process-local.
One live request runs at a time; up to eight requests can wait in the Gradio queue.
AFP_DEVICE=cpu forces CPU evaluation. AFP_CPU_THREADS defaults to 2.
Results are stored in a dedicated temporary directory and expire after one hour.
Local tests do not validate cloud GPU allocation or account quotas; test these after upload.
The public runtime is copied unchanged from the AFP-GIC evaluation release. The demo adapter maps CompressAI's renamed entropy-bottleneck keys and strictly checks every checkpoint key; it does not modify the trained weight values. Images narrower than the released tiler's 512-pixel window use whole-frame decoding in the adapter, without resizing. The license and third-party notices apply; this demo does not relicense the model or its dependencies. The example images are Kodak benchmark material, not newly authored images. Confirm the applicable image redistribution terms before publishing the Space. Uploaded images remain the uploader's responsibility and are not used for training.
The interface uses Lucide icons (ISC license; see static/vendor/LUCIDE_LICENSE).
The vendored Gradio browser client uses Apache-2.0 (see static/vendor/GRADIO_CLIENT_LICENSE).
Adaptive Fused Prior Transfer for Controllable Generative Image Compression
Yifei Pei, Ying Liu, and Nam Ling. IEEE Access, 2026.
The five target labels are nominal operating points, not guaranteed per-image bitrates. Cached examples are labeled as paper examples and do not pretend to be live inference. Only live inference provides bitstreams and session timing. Standalone decompression reports dimensions, bitrate, and operating point, not reference-based quality metrics. It accepts this model's .afp files, not arbitrary archive formats. Uploaded entropy streams are parsed with size bounds. Live operations use a Gradio queue and, on ZeroGPU hardware, a GPU allocation limited to 120 seconds per request. Timing is not comparable to the paper's unified benchmark. Uploads retain their original resolution after EXIF orientation by default; optional Resize mode limits the longest edge to 1024, 1536 or 2048 pixels without upscaling. Metrics use the actual RGB encoder input, so resized results are not full-resolution quality comparisons. The demo accepts up to 12 MiB and 24 megapixels, with each dimension between 64 and 65535 pixels. Resource limits may prevent processing large images; there is no automatic downscaling. Inputs are converted to RGB; transparent pixels are composited over white. Results expire after one hour.
static/ and public_release/. Do not upload .venv or test artifacts.checkpoint/afp_gic_release.pth.tar. A separate model repository is optional.AFP_MODEL_REPO in Space Settings.
The default filename is afp_gic_release.pth.tar; change AFP_MODEL_FILENAME if needed.
Optionally pin AFP_MODEL_REVISION to a verified commit. For private model repos,
store a read-only token as the HF_TOKEN secret, never in source code.Alternatively, set AFP_CHECKPOINT to a checkpoint already present inside the container.
Only load your trusted release checkpoint. Do not accept user-supplied checkpoints.
No Space, model repository, paid hardware, or public upload is created by these files. Check Hugging Face's current account eligibility and hardware pricing before deployment.
Use Python 3.10 and the pinned deployment stack:
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export AFP_CHECKPOINT=/absolute/path/to/afp_gic_release.pth.tar
python zerogpu_app.py
Run exactly one worker: the codec lock and admission control are process-local.
One live request runs at a time; up to eight requests can wait in the Gradio queue.
AFP_DEVICE=cpu forces CPU evaluation. AFP_CPU_THREADS defaults to 2.
Results are stored in a dedicated temporary directory and expire after one hour.
Local tests do not validate cloud GPU allocation or account quotas; test these after upload.
The public runtime is copied unchanged from the AFP-GIC evaluation release. The demo adapter maps CompressAI's renamed entropy-bottleneck keys and strictly checks every checkpoint key; it does not modify the trained weight values. Images narrower than the released tiler's 512-pixel window use whole-frame decoding in the adapter, without resizing. The license and third-party notices apply; this demo does not relicense the model or its dependencies. The example images are Kodak benchmark material, not newly authored images. Confirm the applicable image redistribution terms before publishing the Space. Uploaded images remain the uploader's responsibility and are not used for training.
The interface uses Lucide icons (ISC license; see static/vendor/LUCIDE_LICENSE).
The vendored Gradio browser client uses Apache-2.0 (see static/vendor/GRADIO_CLIENT_LICENSE).