MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / load_tensor

Method load_tensor

lightx2v/utils/service_utils.py:127–130  ·  view source on GitHub ↗
(self, tensor_base64: str, device="cuda")

Source from the content-addressed store, hash-verified

125 return base64.b64encode(self.buffer.getvalue()).decode("utf-8")
126
127 def load_tensor(self, tensor_base64: str, device="cuda") -> torch.Tensor:
128 tensor_bytes = base64.b64decode(tensor_base64)
129 with io.BytesIO(tensor_bytes) as buffer:
130 return self.to_device(torch.load(buffer), device)
131
132
133class ImageTransporter:

Callers

nothing calls this directly

Calls 2

to_deviceMethod · 0.95
loadMethod · 0.45

Tested by

no test coverage detected