File size: 573 Bytes
7e2301f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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