{"record":{"id":"cf1689d862840d3e","repo":"2noise/ChatTTS","slug":"total-number-of-attention-heads-total-num-attent","errorCode":null,"errorMessage":"Total number of attention heads ({total_num_attention_heads}) must be divisible by tensor parallel size ({tensor_parallel_size}).","messagePattern":"Total number of attention heads \\((.+?)\\) must be divisible by tensor parallel size \\((.+?)\\)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"ChatTTS/model/velocity/configs.py","lineNumber":210,"sourceCode":"                \"optimized yet. The speed can be slower than \"\n                \"non-quantized models.\"\n            )\n\n    def _verify_cuda_graph(self) -> None:\n        if self.max_context_len_to_capture is None:\n            self.max_context_len_to_capture = self.max_model_len\n        self.max_context_len_to_capture = min(\n            self.max_context_len_to_capture, self.max_model_len\n        )\n\n    def verify_with_parallel_config(\n        self,\n        parallel_config: \"ParallelConfig\",\n    ) -> None:\n        total_num_attention_heads = self.hf_config.num_attention_heads\n        tensor_parallel_size = parallel_config.tensor_parallel_size\n        if total_num_attention_heads % tensor_parallel_size != 0:\n            raise ValueError(\n                f\"Total number of attention heads ({total_num_attention_heads})\"\n                \" must be divisible by tensor parallel size \"\n                f\"({tensor_parallel_size}).\"\n            )\n\n        total_num_hidden_layers = self.hf_config.num_hidden_layers\n        pipeline_parallel_size = parallel_config.pipeline_parallel_size\n        if total_num_hidden_layers % pipeline_parallel_size != 0:\n            raise ValueError(\n                f\"Total number of hidden layers ({total_num_hidden_layers}) \"\n                \"must be divisible by pipeline parallel size \"\n                f\"({pipeline_parallel_size}).\"\n            )\n\n    def get_sliding_window(self) -> Optional[int]:\n        return getattr(self.hf_config, \"sliding_window\", None)\n\n    def get_vocab_size(self) -> int:","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/2noise/ChatTTS/blob/77b89ee281cd479f5b1a787ada330dc975ca1f2a/ChatTTS/model/velocity/configs.py#L192-L228","documentation":"Error \"Total number of attention heads ({total_num_attention_heads}) must be divisible by tensor parallel size ({tensor_parallel_size}).\" thrown in 2noise/ChatTTS.","triggerScenarios":"Thrown at ChatTTS/model/velocity/configs.py:210 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"}