Spaces:
Runtime error
Runtime error
Commit
·
5197152
1
Parent(s):
ba2bd35
Auto deploy
Browse files- stCompressService.py +1 -2
stCompressService.py
CHANGED
@@ -47,8 +47,7 @@ def compressImage(image: torch.Tensor, model: BaseCompressor, crop: bool) -> Fil
|
|
47 |
image = (image - 0.5) * 2
|
48 |
|
49 |
with model.readyForCoding() as cdfs:
|
50 |
-
codes,
|
51 |
-
binaries, headers = model.compress(self._encoder, codes, size, cdfs)
|
52 |
|
53 |
return File(headers[0], binaries[0])
|
54 |
|
|
|
47 |
image = (image - 0.5) * 2
|
48 |
|
49 |
with model.readyForCoding() as cdfs:
|
50 |
+
codes, binaries, headers = model.compress(image[None, ...], cdfs)
|
|
|
51 |
|
52 |
return File(headers[0], binaries[0])
|
53 |
|