CompressAI icon indicating copy to clipboard operation
CompressAI copied to clipboard

Ubuntu compressed images can't be decoded properly in Windows

Open GZLiao-sysu opened this issue 8 months ago • 1 comments

I've configured Compressai on both Ubuntu and Windows. they both encode and decode fine on their respective systems. But the bin files compressed by Ubuntu are not decoded properly in Windows. How can I fix it?

GZLiao-sysu avatar May 23 '25 08:05 GZLiao-sysu

This occurs due to non-determinism (particularly in the context model) across systems/hardware/etc. We do not currently provide methods to mitigate this. However, you can try the following to see if it helps:

torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False

See also:

  • https://github.com/InterDigitalInc/CompressAI/issues/235#issuecomment-1740940306
  • https://github.com/InterDigitalInc/CompressAI/issues/279#issuecomment-2019388285
  • https://github.com/InterDigitalInc/CompressAI/issues/335#issuecomment-2771481279
  • https://arxiv.org/pdf/2410.09872

YodaEmbedding avatar May 23 '25 23:05 YodaEmbedding