[Model] Add HSDP support for Stable-Audio-Open (#2982)

Signed-off-by: hanzheli <hanzheli@kuaishou.com>
This commit is contained in:
fywc authored and GitHub committed 2026-04-21 18:13:20 +08:00
1 parent ad7c966b1d
commit b001151e0d
6 files changed
+95 -1

No files matched your search

@@ -29,6 +29,22 @@ python text_to_audio.py \
--output stable_audio_output.wav
```
To reduce per-GPU memory for multi-GPU inference, launch with HSDP:
```bash
python text_to_audio.py \
--model stabilityai/stable-audio-open-1.0 \
--prompt "The sound of a hammer hitting a wooden surface" \
--negative-prompt "Low quality" \
--seed 42 \
--guidance-scale 7.0 \
--audio-length 10.0 \
--num-inference-steps 100 \
--use-hsdp \
--hsdp-shard-size 2 \
--output stable_audio_output.wav
```
Key arguments:
- `--prompt`: text description (string).
@@ -37,6 +53,9 @@ Key arguments:
- `--guidance-scale`: classifier-free guidance scale.
- `--audio-length`: audio duration in seconds.
- `--num-inference-steps`: diffusion sampling steps.(more steps = higher quality, slower).
- `--use-hsdp`: enable HSDP weight sharding for the Stable Audio DiT.
- `--hsdp-shard-size`: number of GPUs used for HSDP sharding.
- `--hsdp-replicate-size`: number of HSDP replica groups.
- `--output`: path to save the generated WAV file.
## Example materials