Skip to content

[Feat(Irodori-TTS)] add optional sway sampling - #880

Closed
asfdrwe wants to merge 1 commit into
0xShug0:mainfrom
asfdrwe:feat/add-irodori-tts-sway-samplemethod
Closed

asfdrwe wants to merge 1 commit into
0xShug0:mainfrom
asfdrwe:feat/add-irodori-tts-sway-samplemethod

Conversation

@asfdrwe

@asfdrwe asfdrwe commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds optional Sway timestep scheduling to Irodori-TTS, following the original Python implementation. The existing Euler solver is retained.

  • Add t_schedule_mode (linear or sway) and sway_coeff request options.
  • Keep the existing defaults: linear scheduling and 40 inference steps.
  • Validate the coefficient and require strictly decreasing timesteps.
  • Support the new options with older embedded GGUF model specs.

The options use the existing --request-option interface in audiocpp_cli and the options object in audiocpp_server.

CLI example:

--request-option t_schedule_mode=sway
--request-option sway_coeff=-1.0
--request-option num_inference_steps=10

Server request options:

{
"options": {
"t_schedule_mode": "sway",
"sway_coeff": -1.0,
"num_inference_steps": 10
}
}

Validation

Build configuration:

cmake -S . -B build
-DENGINE_ENABLE_HIP=ON
-DGPU_TARGETS=gfx1101
-DENGINE_BUILD_TESTS=ON
-DAUDIOCPP_MODEL_SET=full
-DAUDIOCPP_BUILD_NATIVE_MODEL_MANAGER=ON
-DCMAKE_BUILD_TYPE=Release

CTest completed successfully:

ctest --output-on-failure
100% tests passed, 0 tests failed out of 76

Manual runtime testing on HIP / AMD Radeon RX 7800 XT:

Interface Tasks Sampling
audiocpp_cli TTS, voice cloning, voice design Linear
audiocpp_server TTS, voice cloning, voice design Linear
audiocpp_cli TTS, voice cloning, voice design Sway, 10 steps
audiocpp_server TTS, voice cloning, voice design Sway, 10 steps

The timestep schedule was also compared numerically with the upstream PyTorch formula. For 10 steps and sway_coeff=-1.0, all timestep values matched in the CPU comparison.

Limitations

This adds sampling control; it does not guarantee unchanged audio quality when reducing the number of steps. End-to-end audio parity with the original Python implementation has not been established.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants