MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS-TTS-Nano / normalize_requested_execution_device

Method normalize_requested_execution_device

app.py:257–261  ·  view source on GitHub ↗
(requested: str | None)

Source from the content-addressed store, hash-verified

255
256 @staticmethod
257 def normalize_requested_execution_device(requested: str | None) -> str:
258 normalized = str(requested or "default").strip().lower()
259 if normalized not in {"default", "cpu"}:
260 return "default"
261 return normalized
262
263 def is_dedicated_cpu_request(self, requested: str | None) -> bool:
264 normalized = self.normalize_requested_execution_device(requested)

Callers 2

resolve_runtimeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected