Spaces:
Running
on
Zero
Running
on
Zero
chong.zhang
commited on
Commit
·
1dc2429
1
Parent(s):
5b58efa
update
Browse files- README.md +0 -5
- app.py +23 -24
- install.sh +16 -0
README.md
CHANGED
@@ -12,8 +12,3 @@ short_description: A Unified Framework for Music, Song, Audio Generation.
|
|
12 |
---
|
13 |
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
15 |
-
|
16 |
-
```bash
|
17 |
-
pip install flash-attn --no-build-isolation
|
18 |
-
git submodule update --init --recursive
|
19 |
-
```
|
|
|
12 |
---
|
13 |
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
app.py
CHANGED
@@ -162,28 +162,27 @@ def main():
|
|
162 |
demo.launch()
|
163 |
|
164 |
if __name__ == '__main__':
|
165 |
-
# model_list = ["InspireMusic-1.5B-Long", "InspireMusic-1.5B", "InspireMusic-Base"]
|
166 |
-
model_list = ["InspireMusic-Base"]
|
167 |
-
|
168 |
-
for model_name in model_list:
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
main()
|
|
|
162 |
demo.launch()
|
163 |
|
164 |
if __name__ == '__main__':
|
165 |
+
# # model_list = ["InspireMusic-1.5B-Long", "InspireMusic-1.5B", "InspireMusic-Base"]
|
166 |
+
# model_list = ["InspireMusic-Base"]
|
167 |
+
#
|
168 |
+
# for model_name in model_list:
|
169 |
+
# model_dir = f"pretrained_models/{model_name}"
|
170 |
+
# if not os.path.isdir(model_dir):
|
171 |
+
# if model_name == "InspireMusic-Base":
|
172 |
+
# snapshot_download(f"iic/InspireMusic", local_dir=model_dir)
|
173 |
+
# else:
|
174 |
+
# snapshot_download(f"iic/{model_name}", local_dir=model_dir)
|
175 |
+
# yaml_file_path = os.path.join(model_dir, 'inspiremusic.yaml')
|
176 |
+
# with open(yaml_file_path, 'r') as file:
|
177 |
+
# lines = file.readlines()
|
178 |
+
# updated_lines = []
|
179 |
+
# for line in lines:
|
180 |
+
# if "basemodel_path: '../../pretrained_models/" in line:
|
181 |
+
# line = line.replace('../../pretrained_models', 'pretrained_models')
|
182 |
+
# elif "generator_path: '../../pretrained_models" in line:
|
183 |
+
# line = line.replace('../../pretrained_models', 'pretrained_models')
|
184 |
+
# updated_lines.append(line)
|
185 |
+
#
|
186 |
+
# with open(yaml_file_path, 'w') as file:
|
187 |
+
# file.writelines(updated_lines)
|
|
|
188 |
main()
|
install.sh
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
pip install flash-attn --no-build-isolation
|
2 |
+
git submodule update --init --recursive
|
3 |
+
mkdir pretrained_models
|
4 |
+
cd pretrained_models
|
5 |
+
git clone https://huggingface.co/FunAudioLLM/InspireMusic-Base.git &
|
6 |
+
git clone https://huggingface.co/FunAudioLLM/InspireMusic-1.5B-Long.git &
|
7 |
+
git clone https://huggingface.co/FunAudioLLM/InspireMusic-1.5B.git &
|
8 |
+
git clone https://huggingface.co/FunAudioLLM/InspireMusic-1.5B-24kHz.git &
|
9 |
+
git clone https://huggingface.co/FunAudioLLM/InspireMusic-Base-24kHz.git &
|
10 |
+
wait
|
11 |
+
|
12 |
+
for i in InspireMusic-Base InspireMusic-Base-24kHz InspireMusic-1.5B InspireMusic-1.5B-24kHz InspireMusic-1.5B-Long
|
13 |
+
do
|
14 |
+
sed -i -e "s/\.\.\/\.\.\///g" ${i}/inspiremusic.yaml
|
15 |
+
done
|
16 |
+
|