You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@loredunk If you downloaded the weights and configuration files, you can also inference.py file by typing the following code
def SNAC_from_pretrained(cls,ckpt_dir):
config_path = os.path.join(ckpt_dir,'config.json')
model_path = os.path.join(ckpt_dir,'pytorch_model.bin')
model = cls.from_config(config_path)
state_dict = torch.load(model_path, map_location="cpu")
model.load_state_dict(state_dict)
model.eval()
return model
SNAC.from_pretrained = classmethod(SNAC_from_pretrained)
snacmodel = SNAC.from_pretrained(ckpt_dir = r".\pth\snac_24khz")
download by yourself and modify:
snacmodel = SNAC.from_pretrained("hubertsiuzdak/snac_24khz").eval().to(device)
=>
snacmodel = SNAC.from_pretrained(repo_id="hubertsiuzdak/snac_24khz", local_dir=f"/root/mini-omni/snac_24khz", local_files_only=True).eval().to(device)
The text was updated successfully, but these errors were encountered: