Skip to content

Integrate More Models #353

@Yiozolm

Description

@Yiozolm

Feature

Code Link: https://github.com/Yiozolm/CompressAI

Add support for recent learned image compression models beyond the current CompressAI model zoo, preferably through staged PRs rather than one large
merge.

The local integration currently includes candidate model entries for:

  • GLIC, CMIC
  • MLIC++, WACNN/STF, LIC-TCM/TCM, DCAE, SAAF, WeConvene
  • TIC, TinyLIC, ShiftLIC small/middle/large
  • Informer, FTIC, InvCompress, CCA
  • HPCM base/large/phi
  • MambaIC, MambaVC

The implementation also extracts shared LIC components instead of duplicating model-specific code, including reusable attention layers, wavelet wrappers, graph/context blocks, SSM/selective-scan wrappers, invertible helpers, and latent codecs such as ChannelSliceLatentCodec and MultistageCheckerboardLatentCodec.

Motivation

CompressAI is widely used as infrastructure for learned image compression research, but the official model coverage mostly stops around ELIC-era architectures. Many newer LIC papers rely on similar building blocks but are currently spread across independent forks with inconsistent APIs, checkpoint layouts, entropy-model implementations, and dependency handling.

Adding these models, or a selected subset of them, would make it easier to:

  • compare recent LIC architectures under a common CompressAI API;
  • reuse shared layers and latent-codec implementations across models;
  • load and convert upstream checkpoints more consistently;
  • provide tested reference implementations for post-ELIC learned image compression research.

Additional context

All source code is taken from the implementation on GitHub. The intergration was developed in collaboration with Opus 4.7.

This is not intended as a single large PR. I would like to first check whether maintainers are open to this direction and how the work should be split.

A possible PR sequence would be:

  1. Shared layers, entropy-model utilities, and latent-codec infrastructure.
  2. Lower-risk licensed models with tests and checkpoint conversion scripts.
  3. Optional-dependency models guarded by lazy imports and clear error messages.
  4. Remaining models after agreeing on license and pretrained-weight policy.

The local branch currently includes smoke tests in tests/test_models.py and tests/test_zoo.py, plus examples/convert_*_checkpoint.py scripts for several upstream checkpoint formats. Optional dependencies such as pytorch_wavelets, FrEIA, mamba_ssm, triton, and natten are gated so that importing compressai should still work without them.

Pretrained weights are not mirrored to CompressAI S3 yet. For candidate entries, pretrained=True can remain disabled until the project decides how to handle official weight hosting. Some upstream candidates also have incomplete license metadata, so those models can be excluded or deferred if that is required for mainline inclusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions