AL-GR commited on
Commit
4c5e815
·
verified ·
1 Parent(s): fcb683f

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +58 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - AL-GR/Item-EMB
5
+ language:
6
+ - zh
7
+ ---
8
+ # Forge-SID-Model
9
+
10
+ This repository contains a pre-trained **RQVAE (Residual Quantized Variational Autoencoder)** model designed for **SID (Speaker Identity/Structure) generation** tasks. It is part of the [FORGE](https://github.com/AL-GR/FORGE) ecosystem.
11
+
12
+ The model weights are stored in `final_sid_rq_model.pth`.
13
+
14
+ ## Usage
15
+
16
+ ### 1. Download the Model
17
+
18
+ You can download the model files locally using the `huggingface_hub` library:
19
+
20
+ ```python
21
+ import os
22
+ # Optional: Use mirror for faster download in some regions (e.g., China)
23
+ os.environ["HF_ENDPOINT"] = "https://hf-mirror.com"
24
+ os.environ["KMP_DUPLICATE_LIB_OK"] = "True"
25
+
26
+ from huggingface_hub import snapshot_download
27
+
28
+ snapshot_download(
29
+ repo_id='AL-GR/Forge-SID-Model',
30
+ local_dir='./Forge-SID-Model', # Replace with your desired local path
31
+ local_dir_use_symlinks=False,
32
+ )
33
+ ```
34
+
35
+ ### 2. Run Inference
36
+
37
+ To use this model for inference, you need to update the checkpoint path in the official inference script provided by the `al_sid` repository.
38
+
39
+ **Step 1:** Clone or download the inference code:
40
+ [https://github.com/selous123/al_sid/blob/main/SID_generation/infer_SID.py](https://github.com/selous123/al_sid/blob/main/SID_generation/infer_SID.py)
41
+
42
+ **Step 2:** Open `infer_SID.py` and locate **Line 23**.
43
+
44
+ **Step 3:** Modify the `CKPT_PATH` variable to point to your downloaded `.pth` file:
45
+
46
+ ```python
47
+ # Original line:
48
+ # CKPT_PATH = 'output_model/checkpoint-7.pth'
49
+
50
+ # Update to (example):
51
+ CKPT_PATH = './Forge-SID-Model/final_sid_rq_model.pth'
52
+ ```
53
+
54
+ > **Note**: Ensure the path matches the actual location where you saved the `final_sid_rq_model.pth` file.
55
+
56
+ ---
57
+
58
+ For more details about the training setup or the FORGE framework, please refer to the main repository: [AL-GR/FORGE](https://github.com/AL-GR/FORGE).