Update README.md
Browse files77 unmodified lines78798081828384851 unmodified line878889909192939495969798991001011021037 unmodified lines11111211311411511611711877 unmodified lines# Install dependenciespip install -r requirements.txt# Download pretrained weights (coming soon)# huggingface-cli download eps-acoustic-revolution-lab/ear-vae2-small --local-dir checkpoints/```## Usage1 unmodified line### Python API```pythonimport torchfrom ear_vae2 import EarVAE2# Load model (full model, with refiner — see configs/ear_vae2.json)config = {"C0": 64, "D": 128, "use_vae": True,"refiner": {"type": "banded", "dim": 256, "intermediate_dim": 1024,"num_layers": 12, "layer_norm_eps": 1e-5},}model = EarVAE2(config)ckpt = torch.load("ear_vae2.pt", map_location="cpu")model.load_state_dict(ckpt["gen"] if "gen" in ckpt else ckpt)model.eval().cuda()7 unmodified lines### Command Line```bashpython inference.py --checkpoint ear_vae2.pt --config configs/ear_vae2.json --input input.wav --output output.wav```77 unmodified lines78798081828384851 unmodified line878889909192939495969798991001011021031041051061071087 unmodified lines11611711811912012112212312412512612712877 unmodified lines# Install dependenciespip install -r requirements.txt# Download config + pretrained weights from the Hubhuggingface-cli download earlab/EAR_VAE2 --local-dir checkpoints/```## Usage1 unmodified line### Python API```pythonimport jsonimport torchfrom huggingface_hub import hf_hub_downloadfrom ear_vae2 import EarVAE2REPO_ID = "earlab/EAR_VAE2"# Resolve config and weights from the Hub (cached locally after the first call)config_path = hf_hub_download(REPO_ID, "config.json")ckpt_path = hf_hub_download(REPO_ID, "weights/ear_vae2.pt")with open(config_path) as f:config = json.load(f)["model"]["gen"]["config"]model = EarVAE2(config)ckpt = torch.load(ckpt_path, map_location="cpu")model.load_state_dict(ckpt["gen"] if "gen" in ckpt else ckpt)model.eval().cuda()7 unmodified lines### Command LineUsing the `checkpoints/` directory populated in the Installation step:```bashpython inference.py \--checkpoint checkpoints/weights/ear_vae2.pt \--config checkpoints/config.json \--input input.wav --output output.wav```
README.md+20-10