{"record":{"id":"11627fc95782c1bf","repo":"2noise/ChatTTS","slug":"unknown-dtype-dtype","errorCode":null,"errorMessage":"Unknown dtype: {dtype}","messagePattern":"Unknown dtype: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"ChatTTS/model/velocity/configs.py","lineNumber":457,"sourceCode":") -> torch.dtype:\n    # NOTE: getattr(config, \"torch_dtype\", torch.float32) is not correct\n    # because config.torch_dtype can be None.\n    config_dtype = getattr(config, \"torch_dtype\", None)\n    if config_dtype is None:\n        config_dtype = torch.float32\n\n    if isinstance(dtype, str):\n        dtype = dtype.lower()\n        if dtype == \"auto\":\n            if config_dtype == torch.float32:\n                # Following the common practice, we use float16 for float32\n                # models.\n                torch_dtype = torch.float16\n            else:\n                torch_dtype = config_dtype\n        else:\n            if dtype not in _STR_DTYPE_TO_TORCH_DTYPE:\n                raise ValueError(f\"Unknown dtype: {dtype}\")\n            torch_dtype = _STR_DTYPE_TO_TORCH_DTYPE[dtype]\n    elif isinstance(dtype, torch.dtype):\n        torch_dtype = dtype\n    else:\n        raise ValueError(f\"Unknown dtype: {dtype}\")\n\n    if is_hip() and torch_dtype == torch.float32:\n        rocm_supported_dtypes = [\n            k\n            for k, v in _STR_DTYPE_TO_TORCH_DTYPE.items()\n            if (k not in _ROCM_NOT_SUPPORTED_DTYPE)\n        ]\n        raise ValueError(\n            f\"dtype '{dtype}' is not supported in ROCm. \"\n            f\"Supported dtypes are {rocm_supported_dtypes}\"\n        )\n\n    # Verify the dtype.","sourceCodeStart":439,"sourceCodeEnd":475,"githubUrl":"https://github.com/2noise/ChatTTS/blob/77b89ee281cd479f5b1a787ada330dc975ca1f2a/ChatTTS/model/velocity/configs.py#L439-L475","documentation":"Error \"Unknown dtype: {dtype}\" thrown in 2noise/ChatTTS.","triggerScenarios":"Thrown at ChatTTS/model/velocity/configs.py:457 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b89ee281cd479f5b1a787ada330dc975ca1f2a","analyzedAt":"2026-08-26T17:48:24.233Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}