Skip to content

Echo-TTS: Sway time scheduling - #1105

Merged
0xShug0 merged 4 commits into
0xShug0:mainfrom
lojack5:echo-tts_sway-schedule
Oct 27, 2026
Merged

0xShug0 merged 4 commits into
0xShug0:mainfrom
lojack5:echo-tts_sway-schedule

Conversation

@lojack5

@lojack5 lojack5 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Saw the idea originally in upstream Irodori-TTS, but since that time it was added to audio.cpp's Irodori-TTS implementation, so this ended up being quite easy to implement.

Changes

  • Refactor Irodori-TTS's timestep scheduling to a higher level header for re-use by Echo-TTS
  • Add t_schedule_mode and sway_coeff request options to Echo-TTS (mirroring the naming used by Irodori-TTS)
  • Set the default num_inference_steps for t_schedule_mode=sway to 12.
  • Added back-compat for sway_coeff and t_schedule_mode so older embedded model specs work with the new options.

Verifications

  • Verified against main (082177e) that Irodori-TTS produces bit-identical output after the refactor
  • Verified Echo-TTS with default arguments produces bit-identical output to main (new way of creating the linear schedule doesn't affect generation).
  • Verified Echo-TTS with t_schedule_mode=linear produces bit-identical output to t_schedule_mode=linear and num_inference_steps=40 (validating correct default selection for steps)
  • Verified Echo-TTS with t_schedule_mode=sway produces bit-identical output to t_schedule_mode=sway and num_inference_steps=12 (validating correct default selection for steps)
  • Verified invalid t_schedule_mode options give an HTTP 400 with proper error message.
  • Verified invalid sway_coeff values (such as 1.0) which produce invalid timestep schedules give an HTTP 400 with proper error message.

Default selection

  • I did a blind A/B/X test across a sweep of sway steps against a reference linear 40-step generation (fixed seed, paired prompts, Q8_0 model, paired cfg_mode), with 3 prompts and both joint and independent CFG modes. At sway 11-step, I could 20% of the time distinguish between the two audios (except for short prompts, in that case I could only distinguish below 10-steps). At 12-steps and above I could not distinguish between audios.
  • Also performed numerical analysis of the generated audios (details in docs/community_models/echo_tts_performance.md.
  • I did NOT do a similar analysis comparing linear 40-step to a sweep of lower step count linear generations.

From these tests and analysis, 12-steps for sway scheduling looks to be a good default.

Effect on RTF

Fundamentally, this is just a comparison of 12-step inference to 40-step inference, but the point is 12-step sway can get similar quality to 40-step linear. This table is also in the docs:

GPU CFG Mode timestep schedule Audio Duration Request Time RTF Speedup
GTX 1080 Ti independent linear-40 2.46s 16.68s x6.78 -
GTX 1080 Ti independent sway-12 2.46s 6.04s x2.45 x2.29
GTX 1080 Ti independent linear-40 9.20s 17.80s x1.94 -
GTX 1080 Ti independent sway-12 9.57s 6.58s x0.69 x2.76
GTX 1080 Ti independent linear-40 26.38s 36.95s x1.40 -
GTX 1080 Ti independent sway-12 26.38s 14.28s x0.54 x2.70
GTX 1080 Ti joint linear-40 3.07s 11.50s x3.75 -
GTX 1080 Ti joint sway-12 3.02s 4.25s x1.41 x2.70
GTX 1080 Ti joint linear-40 9.85s 13.51s x1.37 -
GTX 1080 Ti joint sway-12 9.75s 4.98s x0.51 x2.71
GTX 1080 Ti joint linear-40 27.49s 28.67s x1.04 -
GTX 1080 Ti joint sway-12 27.49s 11.08s x0.40 x2.59
RTX 4070 independent linear-40 2.46s 3.91s x1.59 -
RTX 4070 independent sway-12 2.55s 1.52s x0.59 x2.57
RTX 4070 independent linear-40 9.20s 4.34s x0.47 -
RTX 4070 independent sway-12 9.20s 1.66s x0.18 x2.61
RTX 4070 independent linear-40 26.38s 8.91s x0.33 -
RTX 4070 independent sway-12 26.61s 3.90s x0.15 x2.29
RTX 4070 joint linear-40 2.83s 2.92s x1.03 -
RTX 4070 joint sway-12 2.79s 1.07s x0.38 x2.74
RTX 4070 joint linear-40 9.85s 3.18s x0.32 -
RTX 4070 joint sway-12 9.75s 1.28s x0.13 x2.47
RTX 4070 joint linear-40 27.49s 6.80s x0.25 -
RTX 4070 joint sway-12 27.59s 2.98s x0.11 x2.28

So about a 2.3-2.7 times speedup overall.

… schedule

Adds in plumbing for Sway scheduling as well.

Validated: the switch to FlowSamplerScheduleStep produces bit-identical
output to main.
Validated: with t_schedule_mode=linear, still produces bit-identical
output to main
Documentation for sway time scheduling added, including quality and RTF measurements.

Also add missed joint-cfg lines to /docs/models/echo_tts.md
@0xShug0
0xShug0 merged commit 136a244 into 0xShug0:main Oct 27, 2026
7 checks passed
@0xShug0

0xShug0 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

@lojack5 Thanks! PR merged. Moving timestep scheduling into the shared framework so Irodori-TTS and Echo-TTS can reuse it is a good choice. A follow-up PR could address the minor documentation accuracy.

@lojack5
lojack5 deleted the echo-tts_sway-schedule branch October 28, 2026 23:31
@lojack5

lojack5 commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@0xShug0 Did a quick look through - I see one mistake in the table in the doc and a few typos. Are there other specific things you'd like me to correct for this? I haven't really looked at much of the documentation so I'm not sure other places that would reference things that changed.

@0xShug0

0xShug0 commented Oct 28, 2026

Copy link
Copy Markdown
Owner

@lojack5 Two minor issues:

cfg_mode: documented as float, and omitted from the session-option list. The spec and parser define it as session option echo_tts.cfg_mode, accepting independent or joint.

Performance table: 16.68 / 6.04 ≈ 2.76×, not 2.29×. The joint/sway row’s 2.26 / 3.02 ≈ 0.75 RTF but reported 1.41.

@lojack5

lojack5 commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Got it, and I'll do a pass to see if I notice anything else as well.

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