﻿# Tortoise inference budgets: candidate search is separate from diffusion refinement

Distinguish Tortoise autoregressive candidate generation, CLVP selection, retained outputs, diffusion iterations, and vocoding when comparing presets or optimizing a worker.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-tortoise-candidate-search-clvp-diffusion-stages/
Language: en

## Open the staged speech system

The [Tortoise project](https://github.com/neonbjb/tortoise-tts) presents a speech synthesis system with several collaborating components. Its quality-oriented presets should not be interpreted as a single hidden neural step count. A useful performance analysis distinguishes candidate exploration, candidate scoring, selected-output reconstruction, and final waveform production. This decomposition makes it possible to ask which part of a latency increase changed instead of attributing every difference to diffusion or to a larger language model.

## Separate candidates from returned outputs

The [inference implementation](https://raw.githubusercontent.com/neonbjb/tortoise-tts/main/tortoise/api.py) generates autoregressive candidate sequences according to `num_autoregressive_samples` and selects retained results according to `k`. These settings are different. Asking for more candidates can increase search work without increasing the number of returned waveforms. Conversely, retaining more outputs sends more selected material into later reconstruction. Record effective values after preset overrides rather than assuming the public preset label completely specifies the operating point.

## Understand the ranking stage

The [CLVP implementation](https://raw.githubusercontent.com/neonbjb/tortoise-tts/main/tortoise/models/clvp.py) compares text and speech-token representations. In the synthesis path, scores support candidate selection before the selected sequences are converted through later stages. This is a learned selection signal, not a certificate of correct pronunciation for every sample. A high-ranked candidate can still contain a content error. Treat scoring and listening or transcript-based checks as different evaluation layers rather than reporting the ranking score as an end-user accuracy guarantee.

## Locate diffusion work after selection

The reference API obtains hidden representations for selected autoregressive results, runs spectrogram diffusion, and then uses a vocoder. Changing `diffusion_iterations` adjusts that later refinement work; it does not simply enlarge the earlier search pool. Consider a migration that lowers candidate count while increasing diffusion iterations. Equal total runtime would not establish an equivalent search policy or an unchanged error distribution. Compare retained content and intermediate stage times under a fixed test script before making a quality-versus-runtime claim.

## Benchmark the actual pipeline choice

Record candidate count, batch policy, selection settings, retained outputs, diffusion configuration, and waveform stage timing. Guides to [audio representations](/journal/audio-codec-token-generation/) and [inference evaluation](/journal/inference-benchmark-method/) support interpretation. Keep content fidelity separate from subjective sound. A meaningful benchmark describes the staged operating policy and actual artifacts, making preset changes reviewable without inventing a universal rule that more candidates or more refinement always improves every utterance.
