Annuvin commited on
Commit
1b06320
·
verified ·
1 Parent(s): 40ba236

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -4
README.md CHANGED
@@ -9,15 +9,13 @@ import json
9
  from pathlib import Path
10
 
11
  import torch
12
- from huggingface_hub import snapshot_download
13
  from safetensors.torch import load_model
14
  from snac import SNAC
15
 
16
  device = "cuda"
17
  dtype = torch.float32
18
- path = Path(snapshot_download("annuvin/snac-st"))
19
- config = json.loads((path / "config.json").read_text(encoding="utf-8"))
20
  model = SNAC(**config)
21
- load_model(model, path / "model.safetensors", device=device)
22
  model.to(device, dtype).eval()
23
  ```
 
9
  from pathlib import Path
10
 
11
  import torch
 
12
  from safetensors.torch import load_model
13
  from snac import SNAC
14
 
15
  device = "cuda"
16
  dtype = torch.float32
17
+ config = json.loads(Path("config.json").read_text(encoding="utf-8"))
 
18
  model = SNAC(**config)
19
+ load_model(model, "model.safetensors", device=device)
20
  model.to(device, dtype).eval()
21
  ```