From 810bd3f7c75fec7d0ca2250dfbe40f2a990f9b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=83=9C=ED=99=94?= Date: Sat, 1 Nov 2025 03:03:37 +0900 Subject: [PATCH 1/4] Fix typo in comment about TorchScript support --- compressai/entropy_models/entropy_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compressai/entropy_models/entropy_models.py b/compressai/entropy_models/entropy_models.py index acb98333..6e45ded3 100644 --- a/compressai/entropy_models/entropy_models.py +++ b/compressai/entropy_models/entropy_models.py @@ -437,7 +437,7 @@ def loss(self) -> Tensor: return loss def _logits_cumulative(self, inputs: Tensor, stop_gradient: bool) -> Tensor: - # TorchScript not yet working (nn.Mmodule indexing not supported) + # TorchScript not yet working (nn.Module indexing not supported) logits = inputs for i in range(len(self.filters) + 1): matrix = self.matrices[i] From b2e969607a7cd305dc6f81319466ff2a5e708c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=83=9C=ED=99=94?= Date: Sat, 1 Nov 2025 03:09:38 +0900 Subject: [PATCH 2/4] Fix typo in comment about GaussianConditional.update() --- compressai/entropy_models/entropy_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compressai/entropy_models/entropy_models.py b/compressai/entropy_models/entropy_models.py index 6e45ded3..238c69e9 100644 --- a/compressai/entropy_models/entropy_models.py +++ b/compressai/entropy_models/entropy_models.py @@ -395,7 +395,7 @@ def _get_medians(self) -> Tensor: def update(self, force: bool = False, update_quantiles: bool = False) -> bool: # Check if we need to update the bottleneck parameters, the offsets are - # only computed and stored when the conditonal model is update()'d. + # only computed and stored when the conditional model is update()'d. if self._offset.numel() > 0 and not force: return False From 6db99e6163f1df263042301225a82f1f46c7c162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=83=9C=ED=99=94?= Date: Sat, 1 Nov 2025 03:13:45 +0900 Subject: [PATCH 3/4] Fix deprecation warning message in _dequantize Align message with _quantize() deprecation wording. --- compressai/entropy_models/entropy_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compressai/entropy_models/entropy_models.py b/compressai/entropy_models/entropy_models.py index 238c69e9..855e92df 100644 --- a/compressai/entropy_models/entropy_models.py +++ b/compressai/entropy_models/entropy_models.py @@ -196,7 +196,7 @@ def dequantize( @classmethod def _dequantize(cls, inputs: Tensor, means: Optional[Tensor] = None) -> Tensor: - warnings.warn("_dequantize. Use dequantize instead.", stacklevel=2) + warnings.warn("_dequantize is deprecated. Use dequantize instead.", stacklevel=2) return cls.dequantize(inputs, means) def _pmf_to_cdf(self, pmf, tail_mass, pmf_length, max_length): From 43ee9ed7548bb793209c4bc80184ee8960252c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9D=B4=ED=83=9C=ED=99=94?= Date: Sat, 1 Nov 2025 03:23:04 +0900 Subject: [PATCH 4/4] Fix ruff lint --- compressai/entropy_models/entropy_models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compressai/entropy_models/entropy_models.py b/compressai/entropy_models/entropy_models.py index 855e92df..e43538dd 100644 --- a/compressai/entropy_models/entropy_models.py +++ b/compressai/entropy_models/entropy_models.py @@ -196,7 +196,9 @@ def dequantize( @classmethod def _dequantize(cls, inputs: Tensor, means: Optional[Tensor] = None) -> Tensor: - warnings.warn("_dequantize is deprecated. Use dequantize instead.", stacklevel=2) + warnings.warn( + "_dequantize is deprecated. Use dequantize instead.", stacklevel=2 + ) return cls.dequantize(inputs, means) def _pmf_to_cdf(self, pmf, tail_mass, pmf_length, max_length):