diff --git a/src/compressed_tensors/compressors/model_compressors/model_compressor.py b/src/compressed_tensors/compressors/model_compressors/model_compressor.py index 5ea26705..951eef1f 100644 --- a/src/compressed_tensors/compressors/model_compressors/model_compressor.py +++ b/src/compressed_tensors/compressors/model_compressors/model_compressor.py @@ -310,7 +310,10 @@ def decompress(self, model_path: str, model: Module): model_path = get_safetensors_folder(model_path) sparse_decompressed = False - if self.sparsity_compressor is not None: + if ( + self.sparsity_compressor is not None + and self.sparsity_config.format != CompressionFormat.dense.value + ): # Sparse decompression is applied on the model_path dense_gen = self.sparsity_compressor.decompress(model_path) self._replace_weights(dense_gen, model)