Skip to content

Bound HiFT graph metadata memory independently of audio length - #1331

Merged
0xShug0 merged 1 commit into
mainfrom
fix/hift-metadata-arenas
Nov 18, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
fix/hift-metadata-arenas

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 18, 2026

Copy link
Copy Markdown
Owner

HiFT reserves oversized host metadata arenas even though tensor activations are allocated separately. Its decoder reserves 512 MiB plus 4 MiB per mel frame, so a roughly 74-second input reserves about 15 GiB for a graph using only 3.02 MiB of metadata.

Replace that duration-dependent reservation with a fixed 16 MiB decoder arena, and reduce the F0 graph arena from 128 MiB to 16 MiB. Log reserved and used metadata with the existing framework logging utility. Graph limits, computation, weights and backend activation allocation remain unchanged. Only the shared HiFT implementation changes.

Validation on CUDA with CosyVoice3 HiFT:

Completed input Decoder metadata used F0 metadata used Budget per graph
60 seconds 3.02 MiB 1.28 MiB 16 MiB
18 minutes 10 seconds 3.02 MiB 1.28 MiB 16 MiB
  • The long capacity test produced all 26,160,000 expected samples with finite values. A subsequent 60-second call in the same runtime also completed.
  • Short and long real-speech outputs are byte-identical before and after the change, including a request spanning two text chunks.
  • Capacity tests use synthetic mel features; they establish allocation and execution behavior, not speech quality. Activation memory still grows with input duration.

Validation covers the CosyVoice3 configuration on CUDA; other HiFT configurations and backends were not rerun.

Related to #1329.

@0xShug0
0xShug0 merged commit 4de392e into main Nov 18, 2026
7 checks passed
@0xShug0
0xShug0 deleted the fix/hift-metadata-arenas branch November 18, 2026 16:50
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.

1 participant