Merge pull request #9 from patientx/patch-1

Add _tobytes function to convert tensor to bytes
This commit is contained in:
Jukka Seppänen
2026-05-08 16:37:05 +03:00
committed by GitHub
+2 -1
View File
@@ -7,7 +7,8 @@ from typing import cast, List, Literal, Optional, Union
from diffusers.image_processor import VaeImageProcessor
from diffusers.video_processor import VideoProcessor
from safetensors.torch import _tobytes
def _tobytes(tensor, name):
return tensor.contiguous().cpu().numpy().tobytes()
DTYPE_MAP = {
"float16": torch.float16,