{"record":{"id":"4d26afd9e8ecde86","repo":"2noise/ChatTTS","slug":"too-large-swap-space-msg","errorCode":null,"errorMessage":"Too large swap space. {msg}","messagePattern":"Too large swap space\\. (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"ChatTTS/model/velocity/configs.py","lineNumber":338,"sourceCode":"            )\n\n    def verify_with_parallel_config(\n        self,\n        parallel_config: \"ParallelConfig\",\n    ) -> None:\n        total_cpu_memory = get_cpu_memory()\n        # FIXME(woosuk): Here, it is assumed that the GPUs in a tensor parallel\n        # group are in the same node. However, the GPUs may span multiple nodes.\n        num_gpus_per_node = parallel_config.tensor_parallel_size\n        cpu_memory_usage = self.swap_space_bytes * num_gpus_per_node\n\n        msg = (\n            f\"{cpu_memory_usage / _GB:.2f} GiB out of \"\n            f\"the {total_cpu_memory / _GB:.2f} GiB total CPU memory is \"\n            \"allocated for the swap space.\"\n        )\n        if cpu_memory_usage > 0.7 * total_cpu_memory:\n            raise ValueError(\"Too large swap space. \" + msg)\n        elif cpu_memory_usage > 0.4 * total_cpu_memory:\n            logger.warning(\"Possibly too large swap space. \" + msg)\n\n\nclass ParallelConfig:\n    \"\"\"Configuration for the distributed execution.\n\n    Args:\n        pipeline_parallel_size: Number of pipeline parallel groups.\n        tensor_parallel_size: Number of tensor parallel groups.\n        worker_use_ray: Whether to use Ray for model workers. Will be set to\n            True if either pipeline_parallel_size or tensor_parallel_size is\n            greater than 1.\n    \"\"\"\n\n    def __init__(\n        self,\n        pipeline_parallel_size: int,","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/2noise/ChatTTS/blob/77b89ee281cd479f5b1a787ada330dc975ca1f2a/ChatTTS/model/velocity/configs.py#L320-L356","documentation":"Error \"Too large swap space. {msg}\" thrown in 2noise/ChatTTS.","triggerScenarios":"Thrown at ChatTTS/model/velocity/configs.py:338 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"}