Download code/tests/test_config.py from hello-test1/PhotonTTS: direct link, hf CLI and curl.
- Browser
- Download file 573 Bytes
-
https://huggingface.co/hello-test1/PhotonTTS/resolve/main/code/tests/test_config.py
- Command line
-
hf download hf://hello-test1/PhotonTTS/code/tests/test_config.py
-
curl -L -o test_config.py https://huggingface.co/hello-test1/PhotonTTS/resolve/main/code/tests/test_config.py
573 Bytes
| from pathlib import Path | |
| from photontts.config import load_config | |
| CONFIGS = Path(__file__).resolve().parents[1] / "configs" | |
| def test_all_configs_load(): | |
| for name in ("photon_s", "photon_m", "photon_l", "pilot", "codec"): | |
| cfg = load_config(CONFIGS / f"{name}.yaml") | |
| assert cfg.patch == 2 | |
| def test_tier_ordering(): | |
| s, m, l = (load_config(CONFIGS / f"photon_{t}.yaml") for t in "sml") | |
| assert s.head.dim < m.head.dim < l.head.dim | |
| assert s.backbone.pretrained is None and "0.6B" in m.backbone.pretrained and "1.7B" in l.backbone.pretrained | |