PhotonTTS / code /tests /test_config.py
hello-test1's picture
sync code
7e2301f verified
Raw History Blame Contribute Delete
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