Annuvin
commited on
Update README.md
Browse files
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 |
-
|
19 |
-
config = json.loads((path / "config.json").read_text(encoding="utf-8"))
|
20 |
model = SNAC(**config)
|
21 |
-
load_model(model,
|
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 |
```
|