MCPcopy
hub / github.com/OpenMOSS/MOSS-TTS / load

Method load

moss_soundeffect_v2/diffsynth/models/dac_vae.py:50–57  ·  view source on GitHub ↗
(cls, path)

Source from the content-addressed store, hash-verified

48
49 @classmethod
50 def load(cls, path):
51 artifacts = np.load(path, allow_pickle=True)[()]
52 codes = torch.from_numpy(artifacts["codes"].astype(int))
53 if artifacts["metadata"].get("dac_version", None) not in SUPPORTED_VERSIONS:
54 raise RuntimeError(
55 f"Given file {path} can't be loaded with this version of descript-audio-codec."
56 )
57 return cls(codes=codes, **artifacts["metadata"])
58
59
60class CodecMixin:

Callers 15

_load_audioFunction · 0.80
_load_audioFunction · 0.80
_load_audioFunction · 0.80
_build_demoFunction · 0.80
_load_audioMethod · 0.80
_load_audioFunction · 0.80
_load_audioFunction · 0.80
_load_and_resampleFunction · 0.80
set_voice_promptMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected