2noise/ChatTTS · error · ValueError
Out of memory! No free blocks are available.
Error message
Out of memory! No free blocks are available.
What it means
Error "Out of memory! No free blocks are available." thrown in 2noise/ChatTTS.
Source
Thrown at ChatTTS/model/velocity/block_manager.py:42
device: Device,
block_size: int,
num_blocks: int,
) -> None:
self.device = device
self.block_size = block_size
self.num_blocks = num_blocks
# Initialize the free blocks.
self.free_blocks: BlockTable = []
for i in range(num_blocks):
block = PhysicalTokenBlock(
device=device, block_number=i, block_size=block_size
)
self.free_blocks.append(block)
def allocate(self) -> PhysicalTokenBlock:
if not self.free_blocks:
raise ValueError("Out of memory! No free blocks are available.")
block = self.free_blocks.pop()
block.ref_count = 1
return block
def free(self, block: PhysicalTokenBlock) -> None:
if block.ref_count == 0:
raise ValueError(f"Double free! {block} is already freed.")
block.ref_count -= 1
if block.ref_count == 0:
self.free_blocks.append(block)
def get_num_free_blocks(self) -> int:
return len(self.free_blocks)
class AllocStatus(enum.Enum):
"""Result for BlockSpaceManager.can_allocate
View on GitHub (pinned to 77b89ee281)
When it happens
Trigger: Thrown at ChatTTS/model/velocity/block_manager.py:42 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of 2noise/ChatTTS@77b89ee281 (2026-08-26).
Data as JSON: /api/errors/13c5d0d98873550a.
Report an issue: GitHub.