Apply torchfix (#15532)

Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
cyyever
2025-03-26 12:09:06 +00:00
committed by GitHub
parent cf5c8f1686
commit 1aa162e030
5 changed files with 15 additions and 11 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ class ImageEmbeddingMediaIO(MediaIO[torch.Tensor]):
return self.load_bytes(base64.b64decode(data))
def load_file(self, filepath: Path) -> torch.Tensor:
return torch.load(filepath)
return torch.load(filepath, weights_only=True)
def encode_base64(self, media: torch.Tensor) -> str:
return base64.b64encode(media.numpy()).decode('utf-8')