Present final SteerSound weights and credit pretrained components
Browse filesFiles changed (3)
- README.md+58-22
- config.json-6
- manifest.json+4-9
12 unmodified lines1314151617181920214 unmodified lines2627282930313233343536373839404142434445464748495051525354555657583 unmodified lines62636465666768697071727312 unmodified lines# SteerSoundFinal STEER-Recovery checkpoint for the base audio editor on Complex audio editing. Selected using validation only at recovery depth k=3, epoch 0.5. Checkpoint selection used the highest six-task validation score; test data did not select this checkpoint. Frozen audio VAE, T5 encoder/tokenizer and HiFi-GAN vocoder are included for inference. This repository uses the custom SteerSound architecture; it is not directly loadable with Transformers AutoModel.## Install and run```bashgit clone https://github.com/GeWu-Lab/SteerSound.git4 unmodified linespip install torch==2.7.1 torchaudio==2.7.1 torchvision==0.22.1 --index-url https://download.pytorch.org/whl/cu126pip install -r requirements.txtpip install -e . --no-depspython inference/infer.py --model GeWu-Lab/SteerSound --instruction "Remove the sound of a dog barking." --input input.wav --output edited.wav``````pythonimport soundfile as sffrom steersound import SteerSoundPipelinepipe = SteerSoundPipeline.from_pretrained("GeWu-Lab/SteerSound", device="cuda")wave = pipe("Generate the sound of rain.")sf.write("rain.wav", wave, pipe.sample_rate, subtype="PCM_16")```Provide plain English instructions. Task type and pitch/volume amount are parsed internally; model-control tokens are not user inputs. Editing requires input audio; generation does not. Audio is converted to mono 16 kHz and truncated/right-padded to 10 seconds. Output is 16 kHz mono, 10 seconds. Inference uses BF16, native SDPA, 50 Euler steps and same-reference classifier-free guidance (Add 8.5; all other tasks 3.5). The empty CFG branch remains empty text. Seeded VAE sampling and diffusion noise are keyed by sample ID for evaluation.| Task | Plain instruction | Numeric conditioning ||---|---|---|| Generation | `Generate the sound of rain.` | None || Addition | `Add the sound of a dog barking.` | None || Removal | `Remove the sound of a dog barking.` | None || Replacement | `Replace the sound of a dog barking by the sound of a cat meowing.` | None || Volume | `Increase the volume of the sound of a dog barking by 3.0 dB.` | +3 dB || Pitch | `Reduce the pitch of the sound of a dog barking by 2.0 semitones.` | −2 semitones |Use `Increase` or `Reduce` and an explicit nonnegative magnitude for pitch/volume. Volume supports −5 to +5 dB; pitch supports −4 to +4 semitones in steps of 0.5. Native dataset instructions omit units; units in user input are converted internally to the native one-decimal, unit-free text template. For temporal editing, place the region before the amount, e.g. `Increase the volume of the sound of a dog barking from 2.0 to 4.0 seconds by 3.0 dB.` Use one operation per instruction. This deterministic parser supports the documented English templates; it does not use another language model or guess missing amounts. Unsupported or ambiguous instructions raise an error. Time intervals are conveyed through text to the editor, rather than hard masks applied to the output.## Estimated inference memoryFor one 10-second mono waveform, batch size 1, BF16 and all four components resident on the GPU:| Component | Parameters | BF16 weight storage (GiB) ||---|---:|---:|3 unmodified lines| HiFi-GAN vocoder | 55,264,897 | 0.103 || Total | 1,347,580,003 | 2.510 |These are calculated tensor sizes, not GPU measurements. A planning estimate is **about 4–8 GiB VRAM**, including activations, convolution workspaces, CUDA context and allocator overhead; **8 GiB or more is recommended**. This is not a verified minimum or a guarantee. FP32 weights alone occupy 5.020 GiB. Text is at most 128 tokens; the audio latent is 16×125×8 and has 252 packed tokens. Euler/CFG uses 50 steps and conditional/null forwards run sequentially, so activations from 50 steps are not all retained. Inference has no optimizer or training gradients and uses no CPU offload. Batch size, dtype and GPU/library versions can change the peak. Metric models consume additional memory and are excluded from this estimate.Training memory is substantially higher: all 673M DiT parameters are trained; VAE, text encoder and vocoder stay frozen. Adam states, gradients, activations and communication buffers are additional. The training entry points use ZeRO-2 without CPU offload. Match the desired global batch through GPU count, microbatch and accumulation; no training-memory minimum has been measured.## Files and data`dit/model.safetensors`, `vae/model.safetensors`, `text_encoder/`, `vocoder/` and `config.json` contain the inference components. Optimizer state and private training paths are excluded. The DiT and VAE are stored in BF16; text/vocoder checkpoints are stored in FP32 and cast to BF16 by the default runtime. [Datasets](https://huggingface.co/datasets/GeWu-Lab/SteerSound) use plain instructions. Only the training split provides paired target audio; all validation/test splits, including Complex, contain input audio only. Remaining input WAV bytes and numeric metadata are preserved. [Training and evaluation code](https://github.com/GeWu-Lab/SteerSound) documents STEER-Emphasis, STEER-Recovery and the metric protocols.CPU strict loading and component checks are used during release preparation. This host has no NVIDIA GPU; CUDA execution, inference speed and peak VRAM have not been measured. The installation target above is a GPU environment specification, not a report of a CUDA benchmark.12 unmodified lines1314151617181920212223242526272829303132333435364 unmodified lines41424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495963 unmodified lines10010110210310410510610710810912 unmodified lines# SteerSoundSteerSound is an instruction-guided audio editing model supporting sound generation, addition, removal, replacement, pitch modification and volume modification. This repository provides the final SteerSound weights and the components needed for inference.[Code and training instructions](https://github.com/GeWu-Lab/SteerSound) · [Dataset](https://huggingface.co/datasets/GeWu-Lab/SteerSound)## Model componentsThe audio VAE and DiT editor are trained by the SteerSound team. The text encoder/tokenizer and vocoder use pretrained weights from the sources below.| Component | Source | Files in this repository ||---|---|---|| Audio VAE (encoder and decoder) | Trained by us | `vae/` || DiT audio editor | Trained by us | `dit/` || T5 text encoder and tokenizer | [google-t5/t5-base](https://huggingface.co/google-t5/t5-base), using its encoder | `text_encoder/` || HiFi-GAN vocoder | [cvssp/audioldm2 — vocoder](https://huggingface.co/cvssp/audioldm2/tree/main/vocoder) | `vocoder/` |## Quick startUse Linux, Python 3.10 or 3.11, and an NVIDIA GPU. Install a CUDA-enabled PyTorch build and the inference package:```bashgit clone https://github.com/GeWu-Lab/SteerSound.git4 unmodified linespip install torch==2.7.1 torchaudio==2.7.1 torchvision==0.22.1 --index-url https://download.pytorch.org/whl/cu126pip install -r requirements.txtpip install -e . --no-deps```For private model access, run `huggingface-cli login` with an account that has access. Access to the GitHub repository is also required while the code is private.```pythonimport soundfile as sffrom steersound import SteerSoundPipelinepipe = SteerSoundPipeline.from_pretrained("GeWu-Lab/SteerSound", device="cuda")# Edit an existing recording.audio = pipe("Remove the sound of a dog barking.", audio="input.wav")sf.write("edited.wav", audio, pipe.sample_rate, subtype="PCM_16")# Generate audio without an input recording.audio = pipe("Generate the sound of rain.")sf.write("rain.wav", audio, pipe.sample_rate, subtype="PCM_16")```Command-line inference:```bashpython inference/infer.py \--model GeWu-Lab/SteerSound \--instruction "Remove the sound of a dog barking." \--input input.wav --output edited.wav```## Instruction examples| Task | Instruction ||---|---|| Generation | `Generate the sound of rain.` || Addition | `Add the sound of a dog barking.` || Removal | `Remove the sound of a dog barking.` || Replacement | `Replace the sound of a dog barking by the sound of a cat meowing.` || Volume modification | `Increase the volume of the sound of a dog barking by 3.0 dB.` || Pitch modification | `Reduce the pitch of the sound of a dog barking by 2.0 semitones.` |Supply a plain English instruction. The inference code identifies the task and change amount and adds model-control tokens internally. Editing tasks require input audio; generation does not.For pitch and volume, use `Increase` or `Reduce` with an explicit magnitude. Volume changes support ±5 dB; pitch changes support ±4 semitones in increments of 0.5. A temporal instruction can specify a region, for example: `Increase the volume of the sound of a dog barking from 2.0 to 4.0 seconds by 3.0 dB.` Temporal regions are interpreted by the model from the instruction. Unsupported or ambiguous instructions raise an error.## Audio format and inference settingsInput files are downmixed to mono, resampled to 16 kHz, and truncated or right-padded to 10 seconds. Output is a 10-second mono waveform at 16 kHz. The default runtime uses BF16, PyTorch SDPA and 50 Euler steps, with guidance scale 8.5 for Addition and 3.5 for the other tasks. Use `--seed` with the CLI or `seed=...` with the Python API for repeatable sampling.## Estimated GPU memoryFor one 10-second sample at batch size 1 with all components on the GPU:| Component | Parameters | BF16 weight storage (GiB) ||---|---:|---:|3 unmodified lines| HiFi-GAN vocoder | 55,264,897 | 0.103 || Total | 1,347,580,003 | 2.510 |Estimated total inference memory is **4–8 GiB VRAM**; **8 GiB or more is recommended**. This is an estimate, not a CUDA measurement. The total includes weight storage, activations, workspaces and runtime overhead, and can vary with hardware and library versions. Inference uses no CPU offload. See [MEMORY.md](https://github.com/GeWu-Lab/SteerSound/blob/main/MEMORY.md) for details.## Files and dataThe DiT and VAE weights are stored in BF16. The T5 encoder and vocoder files are stored in FP32 and cast to the runtime dtype when loaded. Architecture and audio settings are in `config.json`.The [SteerSound dataset](https://huggingface.co/datasets/GeWu-Lab/SteerSound) contains plain instructions and input audio. Only the training split provides paired target audio; all validation/test splits, including Complex, provide input audio only. Evaluation protocols and training code are documented in the [code repository](https://github.com/GeWu-Lab/SteerSound).
46 unmodified lines47484950515253545556575846 unmodified lines"num_inference_steps": 50,"max_text_length": 128,"default_dtype": "bfloat16","checkpoint_selection": {"dataset": "complex","split": "val","recovery_k": 3,"epoch": 0.5},"task_ids": {"add": 0,"remove": 1,46 unmodified lines47484950515246 unmodified lines"num_inference_steps": 50,"max_text_length": 128,"default_dtype": "bfloat16","task_ids": {"add": 0,"remove": 1,
123456789101112131415161718{"format_version": 1,"selection": {"split": "val","k": 3,"epoch": 0.5},"files": {"config.json": {"bytes": 1349,"sha256": "f2051f654d6ef8cd43d0a879ee2474c57eba574d6710baf0f831ef417b5d1360"},"README.md": {"bytes": 5725,"sha256": "dcac99e34b7da6ba221965ce7cdfb0027de2c93d30271a94d4421c1b202185bb"},"dit/model.safetensors": {"bytes": 1346719328,12345678910111213{"format_version": 1,"files": {"config.json": {"bytes": 1232,"sha256": "1851bd54305514445591afe73dec20f7142d93892ae24d0fc62dc2855f4d0009"},"README.md": {"bytes": 5283,"sha256": "1a0488a3dfabd191e0d46d6a591f8c6302a61b10a0e1d59f5b47c4715758052f"},"dit/model.safetensors": {"bytes": 1346719328,
README.md+58-22
config.json-6
manifest.json+4-9