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

Method _load_cuda_buffer

lightx2v/common/ops/tensor/tensor.py:63–65  ·  view source on GitHub ↗
(self, weight_dict)

Source from the content-addressed store, hash-verified

61 lazy_load_file_path = os.path.join(self.lazy_load_file, f"block_{self.tensor_name.split('.')[1]}.safetensors")
62 with safe_open(lazy_load_file_path, framework="pt", device="cpu") as lazy_load_file:
63 tensor = lazy_load_file.get_tensor(self.tensor_name)
64 if use_infer_dtype:
65 tensor = tensor.to(self.infer_dtype)
66 else:
67 tensor = weight_dict[self.tensor_name]
68 return tensor

Callers 1

loadMethod · 0.95

Calls 2

_get_tensorMethod · 0.95
toMethod · 0.45

Tested by

no test coverage detected