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

Method _ensure_stream

lightx2v/utils/async_vae.py:99–102  ·  view source on GitHub ↗
(self, device: torch.device)

Source from the content-addressed store, hash-verified

97 return self._device
98
99 def _ensure_stream(self, device: torch.device) -> torch.cuda.Stream:
100 if self._stream is None:
101 self._stream = torch.cuda.Stream(device=device)
102 return self._stream
103
104 def _sync_if_cuda(self, args: tuple[Any, ...]) -> None:
105 if not torch.cuda.is_available():

Callers 1

submitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected