Sayoyo commited on
Commit
96ec844
·
1 Parent(s): a8bbbf9

[feat] lora support

Browse files
Files changed (45) hide show
  1. app.py +1 -0
  2. config/zh_rap_lora_config.json +15 -0
  3. data_sampler.py +14 -7
  4. examples/{input_params → default/input_params}/output_20250426071706_0_input_params.json +0 -0
  5. examples/{input_params → default/input_params}/output_20250426071812_0_input_params.json +0 -0
  6. examples/{input_params → default/input_params}/output_20250426072346_0_input_params.json +0 -0
  7. examples/{input_params → default/input_params}/output_20250426072508_0_input_params.json +0 -0
  8. examples/{input_params → default/input_params}/output_20250426073829_0_input_params.json +0 -0
  9. examples/{input_params → default/input_params}/output_20250426074037_0_input_params.json +0 -0
  10. examples/{input_params → default/input_params}/output_20250426074214_0_input_params.json +0 -0
  11. examples/{input_params → default/input_params}/output_20250426074413_0_input_params.json +0 -0
  12. examples/{input_params → default/input_params}/output_20250426075107_0_input_params.json +0 -0
  13. examples/{input_params → default/input_params}/output_20250426075537_0_input_params.json +0 -0
  14. examples/{input_params → default/input_params}/output_20250426075843_0_input_params.json +0 -0
  15. examples/{input_params → default/input_params}/output_20250426080234_0_input_params.json +0 -0
  16. examples/{input_params → default/input_params}/output_20250426080407_0_input_params.json +0 -0
  17. examples/{input_params → default/input_params}/output_20250426080601_0_input_params.json +0 -0
  18. examples/{input_params → default/input_params}/output_20250426081134_0_input_params.json +0 -0
  19. examples/{input_params → default/input_params}/output_20250426092025_0_input_params.json +0 -0
  20. examples/{input_params → default/input_params}/output_20250426093007_0_input_params.json +0 -0
  21. examples/{input_params → default/input_params}/output_20250426093146_0_input_params.json +0 -0
  22. examples/input_params/output_20250426091716_0_input_params.json +0 -25
  23. examples/zh_rap_lora/input_params/output_20250512101839_0_input_params.json +45 -0
  24. examples/zh_rap_lora/input_params/output_20250512114703_0_input_params.json +45 -0
  25. examples/zh_rap_lora/input_params/output_20250512115409_0_input_params.json +45 -0
  26. examples/zh_rap_lora/input_params/output_20250512120348_0_input_params.json +45 -0
  27. examples/zh_rap_lora/input_params/output_20250512143242_0_input_params.json +45 -0
  28. examples/zh_rap_lora/input_params/output_20250512145057_0_input_params.json +45 -0
  29. examples/zh_rap_lora/input_params/output_20250512152217_0_input_params.json +45 -0
  30. examples/zh_rap_lora/input_params/output_20250512153616_0_input_params.json +45 -0
  31. examples/zh_rap_lora/input_params/output_20250512154907_0_input_params.json +45 -0
  32. examples/zh_rap_lora/input_params/output_20250512160830_0_input_params.json +45 -0
  33. examples/zh_rap_lora/input_params/output_20250512161832_0_input_params.json +45 -0
  34. examples/zh_rap_lora/input_params/output_20250512164224_0_input_params.json +45 -0
  35. examples/zh_rap_lora/input_params/output_20250512171227_0_input_params.json +45 -0
  36. examples/zh_rap_lora/input_params/output_20250512171809_0_input_params.json +45 -0
  37. examples/zh_rap_lora/input_params/output_20250512172941_0_input_params.json +45 -0
  38. examples/zh_rap_lora/input_params/output_20250513044511_0_input_params.json +45 -0
  39. examples/zh_rap_lora/input_params/output_20250513050200_0_input_params.json +45 -0
  40. examples/zh_rap_lora/input_params/output_20250513055451_0_input_params.json +45 -0
  41. examples/zh_rap_lora/input_params/output_20250513060150_0_input_params.json +45 -0
  42. pipeline_ace_step.py +37 -3
  43. requirements.txt +5 -2
  44. test.json +1 -0
  45. ui/components.py +443 -67
app.py CHANGED
@@ -34,6 +34,7 @@ def main(args):
34
  demo = create_main_demo_ui(
35
  text2music_process_func=model_demo.__call__,
36
  sample_data_func=data_sampler.sample,
 
37
  )
38
  demo.queue(default_concurrency_limit=8).launch(
39
 
 
34
  demo = create_main_demo_ui(
35
  text2music_process_func=model_demo.__call__,
36
  sample_data_func=data_sampler.sample,
37
+ load_data_func=data_sampler.load_json,
38
  )
39
  demo.queue(default_concurrency_limit=8).launch(
40
 
config/zh_rap_lora_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "r": 256,
3
+ "lora_alpha": 32,
4
+ "target_modules": [
5
+ "speaker_embedder",
6
+ "linear_q",
7
+ "linear_k",
8
+ "linear_v",
9
+ "to_q",
10
+ "to_k",
11
+ "to_v",
12
+ "to_out.0"
13
+ ],
14
+ "use_rslora": true
15
+ }
data_sampler.py CHANGED
@@ -3,21 +3,28 @@ from pathlib import Path
3
  import random
4
 
5
 
6
- DEFAULT_ROOT_DIR = "examples/input_params"
7
-
8
 
9
  class DataSampler:
10
  def __init__(self, root_dir=DEFAULT_ROOT_DIR):
11
  self.root_dir = root_dir
12
-
13
- # glob
14
  self.input_params_files = list(Path(self.root_dir).glob("*.json"))
 
 
15
 
16
  def load_json(self, file_path):
17
  with open(file_path, "r", encoding="utf-8") as f:
18
  return json.load(f)
19
 
20
- def sample(self):
21
- json_path = random.choice(self.input_params_files)
22
- json_data = self.load_json(json_path)
 
 
 
 
 
 
 
23
  return json_data
 
3
  import random
4
 
5
 
6
+ DEFAULT_ROOT_DIR = "examples/default/input_params"
7
+ ZH_RAP_LORA_ROOT_DIR = "examples/zh_rap_lora/input_params"
8
 
9
  class DataSampler:
10
  def __init__(self, root_dir=DEFAULT_ROOT_DIR):
11
  self.root_dir = root_dir
 
 
12
  self.input_params_files = list(Path(self.root_dir).glob("*.json"))
13
+ self.zh_rap_lora_input_params_files = list(Path(ZH_RAP_LORA_ROOT_DIR).glob("*.json"))
14
+ self.zh_rap_lora_input_params_files += list(Path(ZH_RAP_LORA_ROOT_DIR).glob("*.json"))
15
 
16
  def load_json(self, file_path):
17
  with open(file_path, "r", encoding="utf-8") as f:
18
  return json.load(f)
19
 
20
+ def sample(self, lora_name_or_path=None):
21
+ if lora_name_or_path is None or lora_name_or_path == "none":
22
+ json_path = random.choice(self.input_params_files)
23
+ json_data = self.load_json(json_path)
24
+ else:
25
+ json_path = random.choice(self.zh_rap_lora_input_params_files)
26
+ json_data = self.load_json(json_path)
27
+ # Update the lora_name in the json_data
28
+ json_data["lora_name_or_path"] = lora_name_or_path
29
+
30
  return json_data
examples/{input_params → default/input_params}/output_20250426071706_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426071812_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426072346_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426072508_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426073829_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426074037_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426074214_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426074413_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426075107_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426075537_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426075843_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426080234_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426080407_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426080601_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426081134_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426092025_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426093007_0_input_params.json RENAMED
File without changes
examples/{input_params → default/input_params}/output_20250426093146_0_input_params.json RENAMED
File without changes
examples/input_params/output_20250426091716_0_input_params.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "prompt": "anime, cute female vocals, kawaii pop, j-pop, childish, piano, guitar, synthesizer, fast, happy, cheerful, lighthearted",
3
- "lyrics": "[Chorus]\nねぇ、顔が赤いよ?\nどうしたの? 熱があるの?\nそれとも怒ってるの?\nねぇ、言ってよ!\n\nどうしてそんな目で見るの?\n私、悪いことした?\n何か間違えたの?\nお願い、やめて… 怖いから…\nだから、やめてよ…\n\n[Bridge]\n目を閉じて、くるっと背を向けて、\n何も見なかったフリするから、\n怒らないで… 許してよ…\n\n[Chorus]\nねぇ、顔が赤いよ?\nどうしたの? 熱があるの?\nそれとも怒ってるの?\nねぇ、言ってよ!\n\nどうしてそんな目で見るの?\n私、悪いことした?\n何か間違えたの?\nお願い、やめて… 怖いから…\nだから、やめてよ…\n\n[Bridge 2]\n待って、もし私が悪いなら、\nごめんなさいって言うから、\nアイスクリームあげるから、\nもう怒らないで?\n\nOoooh… 言ってよ!",
4
- "audio_duration": 160,
5
- "infer_step": 60,
6
- "guidance_scale": 15,
7
- "scheduler_type": "euler",
8
- "cfg_type": "apg",
9
- "omega_scale": 10,
10
- "guidance_interval": 0.5,
11
- "guidance_interval_decay": 0,
12
- "min_guidance_scale": 3,
13
- "use_erg_tag": true,
14
- "use_erg_lyric": true,
15
- "use_erg_diffusion": true,
16
- "oss_steps": [],
17
- "timecosts": {
18
- "preprocess": 0.0282442569732666,
19
- "diffusion": 12.104875326156616,
20
- "latent2audio": 1.587641954421997
21
- },
22
- "actual_seeds": [
23
- 4028738662
24
- ]
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
examples/zh_rap_lora/input_params/output_20250512101839_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora",
3
+ "task": "text2music",
4
+ "prompt": "Rap, adult, male, spoken word, singing, bright, energetic, clear",
5
+ "lyrics": "[Intro]\n他们说我来自阴影里\n说我的肤色是原罪的印记\n\n[Verse]\n眼神像刀子刮过 穿透我的皮肤\n带着审判和偏见 让我无处可逃处\n你没听过我的故事 没走过我的路\n凭什么就下一个判决 把我划出你的版图\n你说我威胁到你 抢走了你的机会\n可你可知我付出的 是你不敢想象的血泪\n被贴上标签 被区别对待\n呼吸都是错的 只因我生来就不一样态\n\n[Chorus]\n看不见的墙 把我阻隔在外面\n听不见的声音 屏蔽了我的呼唤\n他们制造偏见 他们散播谎言\n只因为我的存在 让他们觉得不安\n\n[Verse]\n每一次努力争取 都会被审视被放大\n每一个细微的错误 都变成攻击的靶\n他们选择性失明 看不见我的汗水\n只看见他们想看的 带着恶意的定位\n系统性的歧视 像一张无形的网\n把我困在原地 无法自由地翱翔\n他们在享受特权 却指责我的贫困\n嘲笑我的口音 我的名字 我的出身\n\n[Chorus]\n看不见的墙 把我阻隔在外面\n听不见的声音 屏蔽了我的呼唤\n他们制造偏见 他们散播谎言\n只因为我的存在 让他们觉得不安\n\n[Bridge]\n我不想寻求同情 只想被公平对待\n不想被定义被束缚 有选择自己未来的权利\n什么时候 才能放下心中的成见\n看到真正的我 而不是你脑海里的画面\n\n[Outro]\n画面... 不安...\n偏见... 歧视...\n什么时候能停止...",
6
+ "audio_duration": 134.64,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.3,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.032018184661865234,
21
+ "diffusion": 13.275121927261353,
22
+ "latent2audio": 1.291429042816162
23
+ },
24
+ "actual_seeds": [
25
+ 3826585269
26
+ ],
27
+ "retake_seeds": [
28
+ 2907904223
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512101839_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512114703_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora",
3
+ "task": "text2music",
4
+ "prompt": "Chorus Hook, Melodic Rap, Ambient Synth Pads, adult, rap, Very Fast, Storytelling, Chinese Rap, male, spoken word, bright, energetic, Melodic Flow, clear, clarity, 130 bpm",
5
+ "lyrics": "[Intro]\n舌 头 打 结 了... 快 念 快 念...\n\n[Verse 1]\n这 个 赌 鬼 蹲 在 柜 台 啃 着 苦 瓜 干 快 很 干\n赌 桌 堆 满 骨 牌 古 怪 股 票 和 五 块 钢 镚 儿 钢 镚\n他 甩 出 扑 克 牌 啪 啪 啪 拍 扁 螃 蟹 壳 哦 壳 扁\n又 摸 摸 麻 将 摸 出 幺 鸡 摸 出 发 财 摸 出 一 条 蛇 蛇 蛇\n庄 家 咳 嗽 咳 破 锣 嗓 子 喊 开 开 开 快 开 开\n赌 鬼 咕 嘟 咕 嘟 灌 咖 啡 灌 到 筷 子 戳 穿 碗 快 戳 穿\n空 气 里 飘 着 锅 巴 味 混 合 隔 夜 的 酸 奶 罐 哦 酸\n输 光 裤 带 还 想 翻 盘 翻 成 煎 饼 摊 老 板 快 翻 盘\n\n[Chorus]\n赌 鬼 赌 鬼 哦 赌 鬼 赌 鬼 快 很 快\n舌 头 打 结 着 念 这 段 哦 这 段 绕 口 令 牌\n若 念 错 一 字 就 罚 你 哦 罚 你 吞 十 斤 海 带\n赌 场 规 矩 就 是 绕 晕 你 哦 绕 晕 你 快 很 快\n\n[Verse 2]\n他 掏 出 铜 板 抠 出 口 袋 最 后 一 颗 快 很 颗\n庄 家 哗 啦 哗 啦 摇 骰 子 摇 出 三 点 又 三 点 哦 三 点\n赌 鬼 急 得 咬 牙 切 齿 咬 到 舌 头 打 蝴 蝶 结 快 打 结\n还 想 押 上 祖 传 的 拖 鞋 拖 把 铁 锅 和 半 包 盐 盐 盐\n突 然 警 笛 嘀 嘟 嘀 嘟 吓 得 他 钻 进 垃 圾 罐 哦 垃 圾\n警 察 咔 嚓 咔 嚓 拍 照 拍 到 他 头 顶 菠 菜 叶 快 拍 照\n最 后 赌 鬼 蹲 监 狱 天 天 背 这 首 绕 口 令 哦 背 不 完\n若 背 错 一 句 就 加 刑 十 年 再 加 十 年 快 加 刑\n\n[Outro]\n舌 头 打 结 了... 赌 鬼 哭 了 哦...\n这 首 歌... 绕 死 人 了 哦...",
6
+ "audio_duration": 186.59997916666666,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.7,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.03011012077331543,
21
+ "diffusion": 21.696259260177612,
22
+ "latent2audio": 1.7648537158966064
23
+ },
24
+ "actual_seeds": [
25
+ 3776541388
26
+ ],
27
+ "retake_seeds": [
28
+ 4274500599
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512114703_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512115409_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora",
3
+ "task": "text2music",
4
+ "prompt": "electronic, hip-hop, rap, synthesizer, drums, vocals, fast, energetic, modern, uplifting, young adult, male, spoken word, singing, bright, energetic, clear, 140 bpm, female",
5
+ "lyrics": "[Verse 1]\n红鲤鱼绿鲤鱼,驴在河里追鲤鱼,\n驴追鲤鱼鱼躲驴,气得驴子直喘气。\n扁担长板凳宽,扁担绑在板凳边,\n扁担要绑板凳不让绑,扁担偏要绑上板凳面!\n\n[Chorus]\n绕口令,练嘴皮,\n说快说慢别迟疑,\n红鲤鱼驴扁担板凳,\n一口气念完算你赢!\n\n[Verse 2]\n四是四十是十,十四是十四四十是四十,\n谁说四十是十四,舌头打结别放肆。\n黑化肥会挥发,灰化肥也发黑,\n化肥混一起,黑灰不分嘴发废!\n\n[Chorus]\n绕口令,练嘴皮,\n说快说慢别迟疑,\n四十十四化肥灰,\n念错罚你唱十回!\n\n[Bridge]\n坡上立着一只鹅,坡下流着一条河,\n鹅要过河河渡鹅,河要渡鹅鹅笑河——\n到底谁更啰嗦?!\n\n[Outro]\n嘴皮子功夫别小瞧,\n绕口令rap我最飙,\n下次挑战准备好,\n舌头打结别求饶!",
6
+ "audio_duration": 123.2,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.7,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.026150941848754883,
21
+ "diffusion": 12.212433099746704,
22
+ "latent2audio": 1.1857895851135254
23
+ },
24
+ "actual_seeds": [
25
+ 1415752189
26
+ ],
27
+ "retake_seeds": [
28
+ 685932970
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512115409_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512120348_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora",
3
+ "task": "text2music",
4
+ "prompt": "singing, bright, slightly nasal, energetic, spoken word, young adult, male, rap music",
5
+ "lyrics": "[Intro]\nYo, check it—speed demon, lyrical heat, uh!\nRatatat like a drum when the beat bumps, uh!\n\n[Verse 1]\nRapatapa tap tap, flash like a snap,\nRap tap tap, I don’t chat, I clap clap clap!\nFingers snap, flow don’t slack, rapataptaptap,\nSpit it fast, hit the gas, rap tap tap rap!\n\n[Pre-Chorus]\nBoom-bap, zoom past, leave ’em flat,\nRap taptaprapataptaptap—where ya at?\n\n[Chorus]\nRapatapa tap tap, yeah, I go brrrr,\nRap tap tap, make the crowd stir!\nRapataptaptap, no lag, just spit,\nRap taptaprapataptaptap—I’m lit!\n\n[Verse 2]\nTongue-twist, quick wrist, rapatapa boom,\nTap tap rap, leave ya stuck like glue-gum!\nNo slow-mo, turbo, rapataptaptap,\nRap tap rap, yeah, I clap clap clap!\n\n[Outro]\nRapatapa—TAP! Mic drop—that’s that.",
6
+ "audio_duration": 60,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.018491744995117188,
21
+ "diffusion": 8.084580898284912,
22
+ "latent2audio": 0.5694489479064941
23
+ },
24
+ "actual_seeds": [
25
+ 721655639
26
+ ],
27
+ "retake_seeds": [
28
+ 1603201617
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512120348_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512143242_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "ACE-Step/ACE-Step-v1-chinese-rap-LoRA",
3
+ "task": "text2music",
4
+ "prompt": "G-Funk, Hip Hop, Rap, Female Vocals, Melodic Rap, Summer, Laid-back Groove, Smooth Rhythm, Synthesizer Lead, Heavy Bassline, Groovy, West Coast Hip Hop",
5
+ "lyrics": "(Intro)\nOh yeah... \n\n(Verse 1)\n阳光下,沙滩排球场,一个身影跳跃\n小麦色,运动背心,闪耀活力四射\n她跳起扣杀,动作利落又巧妙\n汗水浸湿发梢,笑容比阳光更美好\n摇摆的节奏,是她的背景配乐\n每一次移动,都踩在鼓点上那么和谐\n我不由自主地停下脚步\n目光被她紧紧锁住\n\n(Chorus)\n沙滩排球女孩, 摇摆节拍下的身材\n无忧无虑的笑容,把我的心都填满\n想走上前去搭讪,嫌自己笨拙呆板\n这青春的气息,耀眼,灿烂!\n\n(Verse 3)\n她和队友击掌庆祝,笑声清脆悦耳\n拿起毛巾擦汗,不经意间瞥我一眼\n鼓起勇气走上前,假装问问时间\n她友好地回答,笑容灿烂没有敷衍\n聊了几句,发现彼此爱这摇摆音乐\n她眼中也闪过惊喜和亲切\n这共同点,让气氛变得融洽又热烈!\n夏天的故事,就这样开始了感觉真切!\n\n(Chorus)\n沙滩排球女孩, 摇摆节拍下的身材\n无忧无虑的笑容,把我的心都填满\n不再犹豫和等待,勇敢把脚步迈开\n这夏天的感觉,心跳,不断!",
6
+ "audio_duration": 93.93038,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.03020024299621582,
21
+ "diffusion": 9.942127704620361,
22
+ "latent2audio": 0.9470341205596924
23
+ },
24
+ "actual_seeds": [
25
+ 3826585299
26
+ ],
27
+ "retake_seeds": [
28
+ 2519711205
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512143242_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512145057_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_80k",
3
+ "task": "text2music",
4
+ "prompt": "lyrical rap, young adult, female, rap flow, spoken word, ad-libs, bright, energetic, eat, Fast, Engaging, Energetic",
5
+ "lyrics": "[Intro]\n扁擔寬 板凳長 扁擔想綁在板凳上\n扁擔寬 板凳長 扁擔想綁在板凳上\n\n[Verse]\n倫敦 瑪莉蓮 買了 件 旗袍 送 媽媽\n莫斯科 的 夫司基 愛上 牛肉 麵 疙瘩\n各種 顏色 的 皮膚 各種 顏色 的 頭髮\n嘴裡念的 說的 開始 流行 中國話 (中國話)\n\n[Bridge]\n多少年 我們 苦練 英文 發音 和 文法 (yeah)\n這幾年 換他們 捲著 舌頭 學 平上去入 的 變化\n平平 仄仄 平平 仄\n好聰明 的 中國人 好優美 的 中國話\n\n[Verse]\n扁擔寬 板凳長 扁擔想綁在板凳上\n板凳不讓扁擔綁在板凳上 扁擔偏要綁在板凳上\n板凳偏偏不讓扁擔綁在那板凳上\n到底扁擔寬 還是板凳長?\n\n[Verse]\n哥哥弟弟坡前坐\n坡上臥著一隻鵝 坡下流著一條河\n哥哥說 寬寬的河 弟弟說 白白的鵝\n鵝要過河 河要渡鵝\n不知是那鵝過河 還是河渡鵝\n\n[Chorus]\n全世界都在學中國話\n孔夫子的話 越來越國際化\n全世界都在講中國話\n我們說的話 讓世界都認真聽話\n\n[Verse]\n紐約蘇珊娜開了間禪風 lounge bar\n柏林來的沃夫岡拿胡琴配著電吉他\n各種顏色的皮膚 各種顏色的頭髮\n嘴裡念的 說的 開始流行中國話 (中國話)\n\n[Bridge]\n多少年我們苦練英文發音和文法 (yeah)\n這幾年換他們捲著舌頭學平上去入的變化\n仄仄平平仄仄平\n好聰明的中國人 好優美的中國話\n\n[Verse]\n有個小孩叫小杜 上街打醋又買布\n買了布 打了醋 回頭看見鷹抓兔\n放下布 擱下醋 上前去追鷹和兔\n飛了鷹 跑了兔 灑了醋 濕了布\n\n[Verse]\n嘴說腿 腿說嘴\n嘴說腿 愛跑腿\n腿說嘴 愛賣嘴\n光動嘴 不動腿\n光動腿 不動嘴\n不如不長腿和嘴\n到底是那嘴說腿 還是腿說嘴?\n\n[Chorus]\n全世界都在學中國話\n孔夫子的話 越來越國際化\n全世界都在講中國話\n我們說的話 讓世界都認真聽話\n\n[outro]\n全世界都在學中國話 (在學中國話)\n孔夫子的話 越來越國際化\n全世界都在講中國話\n我們說的話 (讓他) 讓世界 (認真) 都認真聽話",
6
+ "audio_duration": 239.8355625,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.04363536834716797,
21
+ "diffusion": 18.706920385360718,
22
+ "latent2audio": 2.1645781993865967
23
+ },
24
+ "actual_seeds": [
25
+ 2364345905
26
+ ],
27
+ "retake_seeds": [
28
+ 2100914041
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512145057_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512152217_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_80k",
3
+ "task": "text2music",
4
+ "prompt": "articulate, spoken word, young adult, warm, rap music, male, clear, street, dark, rap flow, hardcore rap",
5
+ "lyrics": "[verse]\n球场 的 橡胶味 弥漫 隔壁 是 健身房\n场 边上 的 老教练 战术 有 三套\n教 交叉 运球 的 大叔 会 欧洲步 耍 背后 传\n硬 身板 对抗 最 擅长 还 会 急停跳 后仰 投\n他们 徒弟 我 习惯 从小 就 耳濡目染\n什么 胯下 跟 变向 我 都 玩 的 有模有样\n什么 招式 最 喜欢 转身 过 人 柔中 带 刚\n想要 去 纽约 街头 斗 洛克 公园 场\n\n[chorus]\n看什么 看什么\n变速 突破 心 自在\n看什么 看什么\n假动作 晃 开 防守 来\n看什么 看什么\n每日 训练 绑 沙袋\n空中拉杆 莫 奇怪\n唰唰 入袋\n\n[verse]\n一个 试探 步后 一记 左 变向 右 变向\n一句 挑衅 我 的 人 别 嚣张\n一再 重演 一颗 我 不 投 的 球\n悬在 篮筐 上 它 一直 在 摇晃\n\n[chorus]\n看什么 看什么\n我 激活 小宇宙 来\n看什么 看什么\n菜鸟 新人 的 名号\n看什么 看什么\n已 被 我 一球 击倒\n\n[chorus]\n快 秀出 指尖 转球 砰砰 啪嗒\n快 秀出 指尖 转球 砰砰 啪嗒\n篮球 之 人 切记 勇者 无惧\n是 谁 在 玩 花式 引爆 空气\n快 秀出 指尖 转球 砰砰 啪嗒\n快 秀出 指尖 转球 砰砰 啪嗒\n如果 我 有 滞空 逆天 补扣\n为人 热血 不怂 一生 傲骨 吼\n\n[verse]\n他们 徒弟 我 习惯 从小 就 耳濡目染\n什么 胯下 跟 变向 我 都 玩 的 有模有样\n什么 招式 最 喜欢 转身 过 人 柔中 带 刚\n想要 去 纽约 街头 斗 洛克 公园 场\n\n[outro]\n快 秀出 指尖 转球 砰\n快 秀出 指尖 转球 砰\n如果 我 有 滞空 吼\n为人 热血 不怂 一生 傲骨 吼\n快 秀出 指尖 转球 砰\n我 用 背传 助攻 吼\n压哨 的 三分 球",
6
+ "audio_duration": 239.8355625,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.05357813835144043,
21
+ "diffusion": 25.644447326660156,
22
+ "latent2audio": 2.1787476539611816
23
+ },
24
+ "actual_seeds": [
25
+ 3246571430
26
+ ],
27
+ "retake_seeds": [
28
+ 1352325167
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512152217_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512153616_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_80k",
3
+ "task": "text2music",
4
+ "prompt": "articulate, spoken word, young adult, warm, rap music, male, clear, street, dark, rap flow, hardcore rap, fast",
5
+ "lyrics": "[verse]\n球场 的 橡胶味 弥漫 隔壁 是 健身房\n场 边上 的 老教练 战术 有 三套\n教 交叉 运球 的 大叔 会 欧洲步 耍 背后 传\n硬 身板 对抗 最 擅长 还 会 急停跳 后仰 投\n他们 徒弟 我 习惯 从小 就 耳濡目染\n什么 胯下 跟 变向 我 都 玩 的 有模有样\n什么 招式 最 喜欢 转身 过 人 柔中 带 刚\n想要 去 纽约 街头 斗 洛克 公园 场\n\n[chorus]\n看什么 看什么\n变速 突破 心 自在\n看什么 看什么\n假动作 晃 开 防守 来\n看什么 看什么\n每日 训练 绑 沙袋\n空中拉杆 莫 奇怪\n唰唰 入袋\n\n[verse]\n一个 试探 步后 一记 左 变向 右 变向\n一句 挑衅 我 的 人 别 嚣张\n一再 重演 一颗 我 不 投 的 球\n悬在 篮筐 上 它 一直 在 摇晃\n\n[chorus]\n看什么 看什么\n我 激活 小宇宙 来\n看什么 看什么\n菜鸟 新人 的 名号\n看什么 看什么\n已 被 我 一球 击倒\n\n[chorus]\n快 秀出 指尖 转球 砰砰 啪嗒\n快 秀出 指尖 转球 砰砰 啪嗒\n篮球 之 人 切记 勇者 无惧\n是 谁 在 玩 花式 引爆 空气\n快 秀出 指尖 转球 砰砰 啪嗒\n快 秀出 指尖 转球 砰砰 啪嗒\n如果 我 有 滞空 逆天 补扣\n为人 热血 不怂 一生 傲骨 吼\n\n[verse]\n他们 徒弟 我 习惯 从小 就 耳濡目染\n什么 胯下 跟 变向 我 都 玩 的 有模有样\n什么 招式 最 喜欢 转身 过 人 柔中 带 刚\n想要 去 纽约 街头 斗 洛克 公园 场\n\n[outro]\n快 秀出 指尖 转球 砰\n快 秀出 指尖 转球 砰\n如果 我 有 滞空 吼\n为人 热血 不怂 一生 傲骨 吼\n快 秀出 指尖 转球 砰\n我 用 背传 助攻 吼\n压哨 的 三分 球",
6
+ "audio_duration": 183.23,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.046170711517333984,
21
+ "diffusion": 14.21678113937378,
22
+ "latent2audio": 2.685957193374634
23
+ },
24
+ "actual_seeds": [
25
+ 3072005931
26
+ ],
27
+ "retake_seeds": [
28
+ 562842491
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512153616_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512154907_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_80k",
3
+ "task": "text2music",
4
+ "prompt": "articulate, spoken word, young adult, rap music, female, clear, energetic, warm",
5
+ "lyrics": "[Intro]\n\"System booting... 语言 模型 loading...\"\n\n[Verse 1]\n硅谷 那个 coder 调试 neural network\n北京 的 极客 训练 A I 写 report\n不同 架构 的 chip 不同 算法 的 war\n屏幕上 跑的 全是 machine learning (learning)\n\n[Bridge]\n多少年 我们 chase 摩尔 定律 的 trend (yeah)\n这两年 换他们 study 中文 N L P\nConvolution L S T M\n好烧脑 的 backprop 好暴力 的 big data\n\n[Verse 2]\nPython 强 say加加 刚 Python 调用 C++ 的 A P I\nsay加加 嫌 Python 太 slow Python 笑 C++ 太 hardcore\nL L V M 默默 generate 中间 code\n到底 interpreter 还是 compiler 屌?\n\n[Verse 3]\nP M 和 engineer\n白板 画满 flow chart 服务器 闪着 red light\nP M 说 add feature engineer 说 no way\n需求 变更 code 重构\n不知 是 P M 太 fly 还是 deadline 太 high\n\n[Chorus]\n全世界 都在 train neural network\nTransformer 的 paper 越来越 难 go through\n全世界 都在 tune 超参数\n我们 写的 bug 让 G P U 都 say no\n\n[Verse 4]\n柏林 hackathon demo blockchain contract\n上海 的 dev 用 federated learning 破 data wall\n各种 语言 的 error 各种 框架 的 doc\nterminal 里 滚的 全是 dependency 冲突\n\n[Bridge]\n曾以为 English 才是 coding 的 language (yeah)\n直到见 G P T 用 文言文 generate 正则 expression\nGradient explode\n好硬核 的 prompt 好头秃 的 debug road\n\n[Verse 5]\n有个 bug 叫 quantum\n测试 环境 run perfect 上线 立即就 crash\n查 log 看 monitor 发现是 thread 不同步\n改 sync 加 lock 慢 deadlock 更难办\n量子 computer 也解不开 这 chaos chain\n\n[Verse 6]\n你说 996 我说 007\n你说 福报 我说 burnout\nProduct 要 agile Boss 要 KPI\nCode 要 elegant deadline 是 tomorrow\n不如 直接 script 自动 submit 离职信\n\n[Outro]\n\"Warning: 内存 leak...core dumping...\"\n全世界 都在 train neural network (neural network)\nLoss 还没 converge 天已经亮\n全世界 都在 tune 超参数\n我们 写的 code (让它) 让 world (reboot) 都 reboot 无效",
6
+ "audio_duration": 179.12,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.062120914459228516,
21
+ "diffusion": 13.499217987060547,
22
+ "latent2audio": 1.6430137157440186
23
+ },
24
+ "actual_seeds": [
25
+ 1637990575
26
+ ],
27
+ "retake_seeds": [
28
+ 101283039
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512154907_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512160830_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_80k",
3
+ "task": "text2music",
4
+ "prompt": "articulate, spoken word, young adult, rap music, male, clear, energetic, warm, relaxed, breathy, night club",
5
+ "lyrics": "[verse]\n这 这 谁 又 在 派 对 喝 多\n我 的 脑 袋\n像 被 驴 踢 过\n不 对 劲\n舌 头 打 结 不 会 说\n你 来 挑 战 我 就 跪\n开 局 直 接 崩 溃\n\n[chorus]\n就 咪 乱 咪 念 咪 错 咪\n嘴 咪 瓢 咪 成 咪 狗 咪\n脑 咪 袋 咪 像 咪 浆 咪 糊 咪\n跟 咪 着 咪 节 咪 奏 咪\n把 咪 歌 咪 词 咪 全 咪 忘 咪\n一 咪 张 咪 嘴 咪 就 咪 废 咪\n只 咪 剩 咪 下 咪 尴 咪 尬 咪 回 咪 忆\n草!\n\n[verse]\n错 错 错 错 了\n一 口 气 全 念 错\n错 错 错 错 了\n舌 头 打 结 甩 锅\n甩 甩 甩 甩 锅\n甩 锅 甩 锅\n拍 子 全 部 乱 套\n观 众 笑 到 吐 血\n\n[verse]\n你 的 歌 词 我 的 噩 梦\n唱 完 直 接 社 死\n调 跑 到 外 太 空\n观 众 表 情 裂 开\n你 笑 我 菜\n我 笑 你 不 懂\n这 叫 艺 术 表 演\n不 服 你 来!\n\n[verse]\n这 这 谁 又 在 派 对 丢 人\n我 的 世 界\n已 经 彻 底 崩 溃\n没 有 完 美\n只 有 翻 车 现 场\n以 及 观 众 的 嘲 讽\n\n[chorus]\n就 咪 乱 咪 念 咪 错 咪\n嘴 咪 瓢 咪 成 咪 狗 咪\n脑 咪 袋 咪 像 咪 浆 咪 糊 咪\n跟 咪 着 咪 节 咪 奏 咪\n把 咪 歌 咪 词 咪 全 咪 忘 咪\n一 咪 张 咪 嘴 咪 就 咪 废 咪\n只 咪 剩 咪 下 咪 尴 咪 尬 咪 回 咪 忆\n草!\n\n[verse]\n错 错 错 错 了\n一 口 气 全 念 错\n错 错 错 错 了\n舌 头 打 结 甩 锅\n甩 甩 甩 甩 锅\n甩 锅 甩 锅\n拍 子 全 部 乱 套\n观 众 笑 到 吐 血\n\n[verse]\n你 的 歌 词 我 的 噩 梦\n唱 完 直 接 社 死\n调 跑 到 外 太 空\n观 众 表 情 裂 开\n你 笑 我 菜\n我 笑 你 不 懂\n这 叫 艺 术 表 演\n不 服 你 来!",
6
+ "audio_duration": 169.12,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.041605472564697266,
21
+ "diffusion": 14.009192705154419,
22
+ "latent2audio": 1.55946946144104
23
+ },
24
+ "actual_seeds": [
25
+ 547563805
26
+ ],
27
+ "retake_seeds": [
28
+ 2702917060
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512160830_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512161832_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_80k",
3
+ "task": "text2music",
4
+ "prompt": "articulate, spoken word, young adult, rap music, male, clear, energetic, warm, relaxed, breathy, night club, auto-tune, mumble rap, trap",
5
+ "lyrics": "[verse]\n这 这 谁 又 在 派 对 喝 多\n我 的 脑 袋\n像 被 驴 踢 过\n不 对 劲\n舌 头 打 结 不 会 说\n你 来 挑 战 我 就 跪\n开 局 直 接 崩 溃\n\n[chorus]\n就 咪 乱 咪 念 咪 错 咪\n嘴 咪 瓢 咪 成 咪 狗 咪\n脑 咪 袋 咪 像 咪 浆 咪 糊 咪\n跟 咪 着 咪 节 咪 奏 咪\n把 咪 歌 咪 词 咪 全 咪 忘 咪\n一 咪 张 咪 嘴 咪 就 咪 废 咪\n只 咪 剩 咪 下 咪 尴 咪 尬 咪 回 咪 忆\n草!\n\n[verse]\n错 错 错 错 了\n一 口 气 全 念 错\n错 错 错 错 了\n舌 头 打 结 甩 锅\n甩 甩 甩 甩 锅\n甩 锅 甩 锅\n拍 子 全 部 乱 套\n观 众 笑 到 吐 血\n\n[verse]\n你 的 歌 词 我 的 噩 梦\n唱 完 直 接 社 死\n调 跑 到 外 太 空\n观 众 表 情 裂 开\n你 笑 我 菜\n我 笑 你 不 懂\n这 叫 艺 术 表 演\n不 服 你 来!\n\n[verse]\n这 这 谁 又 在 派 对 丢 人\n我 的 世 界\n已 经 彻 底 崩 溃\n没 有 完 美\n只 有 翻 车 现 场\n以 及 观 众 的 嘲 讽\n\n[chorus]\n就 咪 乱 咪 念 咪 错 咪\n嘴 咪 瓢 咪 成 咪 狗 咪\n脑 咪 袋 咪 像 咪 浆 咪 糊 咪\n跟 咪 着 咪 节 咪 奏 咪\n把 咪 歌 咪 词 咪 全 咪 忘 咪\n一 咪 张 咪 嘴 咪 就 咪 废 咪\n只 咪 剩 咪 下 咪 尴 咪 尬 咪 回 咪 忆\n草!\n\n[verse]\n错 错 错 错 了\n一 口 气 全 念 错\n错 错 错 错 了\n舌 头 打 结 甩 锅\n甩 甩 甩 甩 锅\n甩 锅 甩 锅\n拍 子 全 部 乱 套\n观 众 笑 到 吐 血\n\n[verse]\n你 的 歌 词 我 的 噩 梦\n唱 完 直 接 社 死\n调 跑 到 外 太 空\n观 众 表 情 裂 开\n你 笑 我 菜\n我 笑 你 不 懂\n这 叫 艺 术 表 演\n不 服 你 来!",
6
+ "audio_duration": 169.12,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.04321885108947754,
21
+ "diffusion": 14.026689767837524,
22
+ "latent2audio": 1.5587565898895264
23
+ },
24
+ "actual_seeds": [
25
+ 1905941472
26
+ ],
27
+ "retake_seeds": [
28
+ 3018484796
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512161832_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512164224_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_80k",
3
+ "task": "text2music",
4
+ "prompt": "四川话, spoken word, male, Tempo - Fast, Elements - Chorus Hook, Subgenre-Satirical Hip Hop, Rap, Chinese-language music, energetic, slightly nasal, Instrument - Live Bass Guitar, adult, Vocals - Syncopated Flow, Genre - Hip-Hop, rapping, bright",
5
+ "lyrics": "[chorus]\n黑 墨镜 金 链子 越 低调 越 霸气\n玩 街机 泡 吧里 再 野的 场子 都 不 怯气\n上海 滩 老 江湖 外滩 钟声 敲 胜负\n陆家嘴 黄浦江 财路 宽 给 你 开 扇窗\n\n[verse]\n老子 在 弄堂 斜起 走 想 拦路 的 先 报 名号\n我 早看透 你们 手抖 脚软\n只敢 网上 吠 现实 怂成 猫\n看 你们 混的 真 可怜 整天 蹲在 网吧 蹭 烟\n钱 赚不到 架 不敢打 还 学人 摆 大哥 脸\n\n[verse]\n叫 我 沪上 老 克勒 不是 拉菲 我 不 碰杯\n规矩 我 懒得 讲 太多 钞票 直接 拍 你 脸上 飞\n老子 耐心 差 门槛 高 你 找茬 等于 自 寻 烦恼\n要么 跪 要么 爬 最后 警告 只 说 一 遭\n\n[chorus]\n黑 墨镜 金 链子 越 低调 越 霸气\n玩 街机 泡 吧里 再 野的 场子 都 不 怯气\n上海 滩 老 江湖 外滩 钟声 敲 胜负\n陆家嘴 黄浦江 财路 宽 给 你 开 扇窗\n\n[verse]\n古巴 雪茄 在 指间 绕 代表 魔都 格调 必须 顶\nOG 在 你 够不到 的 高度 My bro 永远 在 顶层 盯\nCheck my vibe 不靠 大 金劳 留声机 放 周璇 和 白光\n爹妈 太 宠你 养出 巨婴 症 早晚 社会 教你 做人 经\n\n[verse]\n玩 说唱 小囡 太 年轻 要 比 flow 先去 练 气功\n廿年 磨 枪 才 亮 锋芒 我 三十六 招 收 你 入 瓮\n老子 存在 就是 打假 标\n多少 人 眼红 又 不敢 挑\n键盘 侠 的 狠话 像 棉花 糖\n见 真人 秒变 Hello Kitty 叫\n\n[chorus]\n黑 墨镜 金 链子 越 低调 越 霸气\n玩 街机 泡 吧里 再 野的 场子 都 不 怯气\n上海 滩 老 江湖 外滩 钟声 敲 胜负\n陆家嘴 黄浦江 财路 宽 给 你 开 扇窗\n\n[chorus]\n黑 墨镜 金 链子 越 低调 越 霸气\n玩 街机 泡 吧里 再 野的 场子 都 不 怯气\n上海 滩 老 江湖 外滩 钟声 敲 胜负\n陆家嘴 黄浦江 财路 宽 给 你 开 扇窗",
6
+ "audio_duration": 135.92,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.038518667221069336,
21
+ "diffusion": 16.47420620918274,
22
+ "latent2audio": 2.5094873905181885
23
+ },
24
+ "actual_seeds": [
25
+ 2159904788
26
+ ],
27
+ "retake_seeds": [
28
+ 2403013980
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512164224_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512171227_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "ACE-Step/ACE-Step-v1-chinese-rap-LoRA",
3
+ "task": "text2music",
4
+ "prompt": "Rap, Chinese Rap, J-Pop, Anime, kawaii pop, EDM, Aggressive, Intense, Crisp Snare, Super Fast, Clear",
5
+ "lyrics": "(Intro)\nLet's drift away...\n\n(Verse 1)\n现实是灰色的格子间,重复的工作,枯燥的报表 \n敲打着键盘,眼神却放空,意识早已挣脱了肉体的镣铐\n飘向窗外,飞过拥挤的街道,穿过云层,到达想象的群岛\n那里色彩斑斓,形状奇异,逻辑失效,一切都随心所欲地飘摇\n迷幻的鼓点,像心跳的变奏,忽快忽慢,难以预料\n抽象的采样,扭曲的人声,构建一个超现实的音景环绕\n我变成一只鸟,一条鱼,一束光,自由地变换形态和奔跑\n在这白日梦里,我无所不能,摆脱了所有现实的烦恼, feeling the afterglow\n\n(Chorus)\n意识漫游,逃离乏味的轨道 \n迷幻嘻哈的节拍,是白日梦的引导 \n抽象的世界,逻辑被重新构造\nMind wandering free, where reality starts to fade slow\n\n(Verse 2)\n会议室里老板在讲话,声音模糊,像隔着水听不清道\n我的思绪,早已潜入深海,与发光的水母一起舞蹈\n或者飞向外太空,在星云间穿梭,探索未知的星球和轨道\n现实的规则,在这里被打破,物理定律也失去效劳\n白日梦是我的避难所,是精神的氧气罩\n在乏味的现实里,为我注入一点色彩和奇妙\n虽然短暂,虽然虚幻,但它让我能够喘息,重新把能量找到\n然后回到现实,继续扮演那个,循规蹈矩的角色,把梦藏好, keep the dream aglow\n\n(Chorus)\n意识漫游,逃离乏味的轨道\n迷幻嘻哈的节拍,是白日梦的引导\n抽象的世界,逻辑被重新构造\nMind wandering free, where reality starts to fade slow\n",
6
+ "audio_duration": 153.7148,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.04823446273803711,
21
+ "diffusion": 13.158645629882812,
22
+ "latent2audio": 1.493880033493042
23
+ },
24
+ "actual_seeds": [
25
+ 2945962357
26
+ ],
27
+ "retake_seeds": [
28
+ 2676242300
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0.7,
32
+ "guidance_scale_lyric": 1.5,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512171227_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512171809_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora",
3
+ "task": "text2music",
4
+ "prompt": "J-Pop, Anime, kawaii future bass, Femal vocals, EDM, Boombap, Aggressive, Intense, Crisp Snare, Super Fast, Rap",
5
+ "lyrics": "[Intro]\nYo, 这是来自深渊的怒吼\n\n[Verse]\n指尖飞快刷新,屏幕又亮起\n渴望那点赞,像致命的氧气\n精心修饰的脸庞,完美到诡异\n背后隐藏的疲惫,谁又会在意\n光鲜亮丽的橱窗,贩卖着焦虑\n每个人都在表演,戴着虚伪面具\n比较的游戏,让人逐渐窒息\n迷失在数据洪流,找不到自己\n\n[Chorus]\n这流量的时代,真假早已分不清\n盲目追随潮流,丢掉了初心\n为了那点虚荣,灵魂在沉沦\n看不见的锁链,捆绑每个灵魂\n\n[Verse]\n滤镜下的生活,美得不切实际\n营造虚假繁荣,掩盖内心空虚\n他人的光环下,显得自己多余\n嫉妒和自卑,交织成悲剧\n\n[Chorus]\n朋友圈里炫耀,现实中却叹气\n刷着别人的故事,忘记了呼吸\n算法推荐着你,想看的一切东西\n不知不觉间,你已不再是你\n他们说这是进步,我看是种病\n精神鸦片侵蚀,慢慢要了你的命\n\n[Bridge]\n屏幕亮了又暗,一天又过去\n究竟得到了什么,还是失去了自己\n那真实的连接,在何处寻觅\n困在这迷宫里,找不到出口的轨迹\n\n[Outro]\n我想挣脱,我想呼吸\n这虚拟的繁华,让我喘不过气\n谁能告诉我,这到底有什么意义\n一切都像泡沫,一触就破裂没余地",
6
+ "audio_duration": 119.44348,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.04764962196350098,
21
+ "diffusion": 10.94297981262207,
22
+ "latent2audio": 1.1815783977508545
23
+ },
24
+ "actual_seeds": [
25
+ 3826585273
26
+ ],
27
+ "retake_seeds": [
28
+ 2527594022
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512171809_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250512172941_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_80k",
3
+ "task": "text2music",
4
+ "prompt": "Hip Hop, Hi-hat Rolls, spoken word, Melodic Flow, articulate, Female Rap, 120 BPM, clear, warm, female, melodic Rap, adult, super fast",
5
+ "lyrics": "[Verse 1]\n打南边来了个喇嘛,手里提拉着五斤鳎目,\n打北边来了个哑巴,腰里别着个喇叭。\n喇嘛想换哑巴的喇叭,哑巴摇头不说话,\n鳎目一甩像道闪电,喇叭一响震天涯!\n\n[Chorus]\n丁丁当当,乒乓乓乓,\n话赶话,舌绕梁,\n东边的钉,西边的墙,\n绕不完的弯,唱不完的慌!\n\n[Verse 2]\n墙上一根钉,钉下绳摇晃,\n绳吊着瓶,瓶碰碎了光。\n灯骂瓶,瓶怪绳,绳怨钉,\n稀里哗啦,一场荒唐!\n\n[Chorus]\n丁丁当当,乒乓乓乓,\n话赶话,舌绕梁,\n东边的钉,西边的墙,\n绕不完的弯,唱不完的慌!\n\n[Verse 3]\n板凳宽,扁担长,\n一个偏要绑,一个偏不让。\n青龙洞里龙翻身,\n千年大梦变稻香!\n\n[Bridge]\n麻婆婆的狗,咬破麻叉口,\n麻线穿针眼,补丁也风流。\n左一句,右一句,\n舌头打结心自由!\n\n[Chorus]\n丁丁当当,乒乓乓乓,\n话赶话,舌绕梁,\n东边的钉,西边的墙,\n绕不完的弯,唱不完的慌!",
6
+ "audio_duration": 214.12,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.031190156936645508,
21
+ "diffusion": 20.130417823791504,
22
+ "latent2audio": 1.9650826454162598
23
+ },
24
+ "actual_seeds": [
25
+ 1946426111
26
+ ],
27
+ "retake_seeds": [
28
+ 331383387
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250512172941_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250513044511_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_100k",
3
+ "task": "text2music",
4
+ "prompt": "东北话, spoken word, male, Tempo - Fast, Elements - Chorus Hook, Subgenre-Satirical Hip Hop, Rap, Chinese-language music, energetic, slightly nasal, Instrument - Live Bass Guitar, adult, Vocals - Syncopated Flow, Genre - Hip-Hop, rapping, bright",
5
+ "lyrics": "[verse]\n挣着 憋屈的 工资 还得 装乐呵\n猫着 怂样儿 还搁 朋友圈 嘚瑟\n扛着 傻逼的 指标 没人 搭把手\n这儿 不是 托儿所 少整 那出儿 哭唧尿嚎\n\n俺们 就像 一条条 老板的 裤衩子\n陪着 笑脸 接他 每一回 突突\n哎呦 老板 今儿个 穿我呗\n他 撅个腚 眼角 瞟你 那熊样\n\n[chorus]\n他们 骂我 打工仔 太多人 没睡醒\n寻思 抠搜 老板 一天天 穷折腾\n不想 俺的 人生 烂在 这嘎达\n不想 俺的 将来 折在 这破棚\n\n老子 不想 上班 老子 是外星人\n你都 把俺 骂急眼了 俺还 这么淡定\n现实 才是 梦 啥时候 能醒啊\n那 糟践人的 答案 在西北风 里飘\n\n[verse]\n瞅见 二愣子 同事 给老板 舔腚沟子\n瞅见 浪蹄子 女同事 在老板 胯骨轴 扭搭\n瞅见 白瞎的 光阴 耗在 没亮儿的 道儿\n瞅见 公交车上 一帮 僵尸 吐酸水\n\n瞅见 俺的 命 定在 苦逼的 坑里\n瞅见 俺的 爱情 被轮了 成了 老处女\n瞅见 好事儿 全归 高富帅\n还有 那些 臭不要脸 扭腚的 货色\n\n[chorus](重复)\n他们 骂我 打工仔 太多人 没睡醒...\n\n[bridge]\n加班 没补助 俺认了\n欠薪 揍员工 把俺 当牲口\n去你妈 的小姘头\n\n[verse]\n破逼 管理制度 净整 娱乐八卦\n撸管式 管理 也就 你自己 嗨\n出点儿 屁事儿 就往 下属 脑瓜子 扣\n挣俩 钢镚儿 立马 牛逼 不分 公母\n\n你挖个 大坑 把俺们 往里 踹\n说这 叫梦想 你当年 多能耐\n俺们 就当 听传销 洗脑课\n可怜 连骗人 你都 就会 这一套\n\n[outro]\n老子 不想 上班\n老子 不想 上班\n老子 不想 上班",
6
+ "audio_duration": 135.92,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.06204533576965332,
21
+ "diffusion": 35.75483560562134,
22
+ "latent2audio": 1.5193355083465576
23
+ },
24
+ "actual_seeds": [
25
+ 4176354214
26
+ ],
27
+ "retake_seeds": [
28
+ 601086915
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250513044511_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250513050200_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_100k",
3
+ "task": "text2music",
4
+ "prompt": "Rap, J-Pop, Anime, kawaii pop, EDM, Aggressive, Intense, Crisp Snare, Super Fast, Clear",
5
+ "lyrics": "[Intro]\nNya.\n\n[Verse]\n我 在 五 点 二 十 早 起,十 三 点 十 四 弹 会儿 琴\n习 惯 了 坐 班,习惯了 隔夜 的 剩 饭,\n习 惯 了 没有 你\n\n[Verse]\n怕 你 想 不 开,拦 在 你 的 面 前\n那 时 候 摔 得 差 点 住 院\n东 京 的 春 天 莺 莺 燕 燕\n我 说 想 不 想 来 跟 我 玩 音乐\n\n[Verse]\n带 着 我 的 朋 友 守 在 你 的 门 口\n弹 着 我 的 钢 琴 当 伴 奏\n等 你 放 学 后,陪 你 K T V\n端 着 我 的 红 茶 跟 你 碰 杯\n\n[Pre-Chorus]\n忽然间现实淹没了远方\n万家灯火,盖住月光\n奔走,忍受,变成了人偶\n别再对我伸出你的 双 手,会 受 伤\n\n[Chorus]\n明明都向前走,方向却渐渐不同\n时间让你我越走越近,却越来越陌生\n春 天 在 滂 沱 的 大 雨 里 飘 落\n得 了 心 太 高 脸 太 薄 的病\n\n[Bridge]\n我越难过,春日影越顶\n眼泪晃得我看不清\n埋葬了懦弱还有矫情\n却还是会在半夜摸眼睛\n\n青春期大部分时间在工 作\n用微笑换来余额几个零\n戴上了面具也明白了生活\n拼的是数字和脸更是命\n\n[Verse]\n我在五点二十早起,十三点十四弹会琴\n早上要做饭,回家时满地的瓶罐\n\n师 徒 二 人 站 在 我 的 面 前\n台 词 很 熟 练,照 着 就 念\n\n背 后 的 小 睦 扭 扭 捏 捏\n我 说 我 还 有 点 事 要 不 改 天 见\n\n然 后 你 的 双手 握 住 我 的 袖 口\n开 始 哭 着 求 我 不 要 走\n\n[Verse]\n我在下班后,忙活柴米油\n你和你的姐妹住着高楼\n\n苦 来 兮 苦,早 就 没 了\n现 实 扬 鞭,赶 着 我 向 前\n没有时间跟你分辨什么对与错\n\n[Bridge]\n没有什么对错,没有罪过\n谁不曾天真,是我太早看破\n生活一片狼藉,却又不想放弃\n一 边 聚 光 灯 下 绽 放,一 边 坠 落\n故作坚强,筑起心的墙\n越是委屈的伤口,越要藏\nLet it all out, it’s all right\n\n[Outro]\n俺 是 东 京 嘞,东 京 打 工 妹\n\n从虎之门带你转到浅草\n再从新宿转到竹桥\n\n俺 是 东 京 嘞,东 京 打 工 妹\n\n带 你 转 羽田 成田 蒲田 神田\n做 你 嘞 小 甜 甜!\n\n俺 是 东 京 嘞,东 京 打 工 妹\n带 你 转 赤 坂,带 你 转 霞 关\n恁 咋 不 早 说,今 天 不 管 饭\n",
6
+ "audio_duration": 147.62212,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.5,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.052134037017822266,
21
+ "diffusion": 17.909283876419067,
22
+ "latent2audio": 1.4904146194458008
23
+ },
24
+ "actual_seeds": [
25
+ 2945962357
26
+ ],
27
+ "retake_seeds": [
28
+ 2252292438
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0.7,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250513050200_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250513055451_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_100k",
3
+ "task": "text2music",
4
+ "prompt": "Rap, adult, male, spoken word, rapping, clear, warm, articulate, Lo-Fi Hip Hop, 100-120 BPM, Keyboard Chords, Male Rap, Lazy Rhythm, Melancholy, Rap",
5
+ "lyrics": "[Intro]\n夜色 很 淡 像 褪色 的 照片 \n但 记忆 却 像 刀锋 一样 锐利 \n\n[Verse 1]\n你 说过 的 甜言蜜语 现在 听来 像 最 恶毒 的 咒骂 \n你 刺进 我 心里 的 刀 现在 还 在 滴血 未 干 哪 \n慵懒 的 旋律 像 我 的 脚步 拖着 沉重 的 躯壳 \n脑海 里 循环 播放 那 画面 快 把 我 逼疯 了 \n键盘 和弦 低沉 又 忧伤 弹奏 着 我 的 绝望 \n我 曾经 的 信任 像 玻璃 一样 被 你 狠狠 地 摔 在 地上 \n不想 振作 不想 原谅 只 想 让 这 一切 都 停止 \n可 心底 有 个 声音 嘶吼 着 要 你 付出 该 有 的 代价 \n\n[Chorus]\n背叛 像 毒药 渗透 我 的 血液 \n复仇 的 火焰 在 我 眼中 燃起 \n哪怕 遍体鳞伤 哪怕 万劫不复 \n我 也 要 亲手 撕碎 你 的 幸福 \n这 是 我 的 哀歌 也 是 我 的 战书 \n键盘 的 音符 每 一下 都 带着 恨意 和 痛苦 \n\n[Verse 2]\n曾经 的 兄弟 现在 面目全非 像 个 陌生人 \n你 的 自私 像 癌细胞 一点点 吞噬 我 的 纯真 \n我 学着 你 的 样子 把 心 锁 起来 不再 轻易 相信 \n让 懒散 的 节奏 包裹 我 给 自己 一点 喘息 \n键盘 的 音色 变得 更加 阴冷 像 秋天 的 雨滴 \n冲刷 掉 所有 温情 只 剩下 彻骨 的 寒意 \n我 不会 大喊大叫 只是 默默 地 计划 \n每 一步 都 走向 让 你 后悔 的 那 一 刹那 \n\n[Chorus]\n背叛 像 毒药 渗透 我 的 血液 \n复仇 的 火焰 在 我 眼中 燃起 \n哪怕 遍体鳞伤 哪怕 万劫不复 \n我 也 要 亲手 撕碎 你 的 幸福 \n这 是 我 的 哀歌 也 是 我 的 战书 \n键盘 的 音符 每 一下 都 带着 恨意 和 痛苦 \n\n[Bridge]\n也许 复仇 不能 带来 平静 \n也许 只 会 让 我 更 堕落 \n但 如果 不 这样 做 \n我 连 活下去 的 勇气 都 没有 \n\n[Outro]\n复仇 复仇 复仇 \n直到 最后 一刻 \n懒散 地 复仇 着 ",
6
+ "audio_duration": 202.64,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.65,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 0.036400794982910156,
21
+ "diffusion": 23.055809259414673,
22
+ "latent2audio": 1.8787360191345215
23
+ },
24
+ "actual_seeds": [
25
+ 3900061002
26
+ ],
27
+ "retake_seeds": [
28
+ 3037373819
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250513055451_0.wav"
45
+ }
examples/zh_rap_lora/input_params/output_20250513060150_0_input_params.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "lora_name_or_path": "/root/sag_train/data/ace_step_v1_chinese_rap_lora_100k",
3
+ "task": "text2music",
4
+ "prompt": "Orchestra, Symphony, Sonata, Opera, Concerto, Rap, Beat, DJ, MC, StreetCulture",
5
+ "lyrics": "[verse1]\n羊皮卷轴 墨香飘 莫扎特 熬 安魂曲 通宵 \n和弦齿轮 咔哒转 比 瑞士 手表 更 精密 律动 \n八轨磁带 玩叠叠乐 披头士 炸 录音棚 天花板 \nAI 卷起 新风暴 像 灭霸 打响指 般 简单 \n\n[chorus]\n琴弦 到 代码 进化论 狂飙(skr) \n象牙塔 被 鼠标 点爆 像 泡泡(boom) \n灵感 加 算法 等于 王炸 大招 \n人类 心跳 才是 终极 混音 调料 \n\n[verse2]\n春之祭 召唤 百人 乐团 才够 燥 \n合成器 极客 玩电焊 焊出 赛博 神庙 \nDAW 解放 双手 钢琴卷帘 变 乐高 \n音色库 开挂 像 吃 金币 的 马里奥 \n\nAI 拆解 爵士乐 黑话 像 庖丁 解牛 \nCityPop 复古 滤镜 直接 参数 调油 \n神经网络 偷师 贝多芬 半夜 翻墙头 \n音乐 基因库 被 改写成 超频 万花筒 \n\n[chorus] \n琴弦 到 代码 进化论 狂飙(skr) \n象牙塔 被 鼠标 点爆 像 泡泡(boom) \n灵感 加 算法 等于 王炸 大招 \n人类 心跳 才是 终极 混音 调料 \n\n[verse3] \n电子琴 被 吐槽 塑料 味 超标 \n卧室 制作人 用 鼠标 单挑 整个 乐团 编制 \nAI 伴奏 刚上线 就被 键盘侠 集火 \n却 忘了 电吉他 曾被 说 是 魔鬼 的 副歌 \n\n现在 我 指尖 蹦迪 在 数据 炼丹炉 \n提示词 召唤 莫扎特 跨次元 碰杯 珍珠奶茶 \n当 比特 海洋 淹没 所有 物理 琴柱 \n最后 的 音轨 永远 连着 心脏 的 跳针 \n\n[bridge] \n鹅毛笔 蘸着 银河 当 墨汁(绝了) \n音浪 在 元宇宙 开 分店(疯了) \n技术 迷雾 散成 像素 烟花 \n而 我们 始终 带着 老派 的 心跳 混搭 \n\n[chorus] \n琴弦 到 代码 进化论 狂飙(skr) \n象牙塔 被 鼠标 点爆 像 泡泡(boom) \n灵感 加 算法 等于 王炸 大招 \n人类 心跳 才是 终极 混音 调料 \n\n[outro] \n从 蒸汽 到 硅基 浪潮 我 冲浪(yo) \n用 脑洞 接住 每个 技术 暴击(叮) \n当 所有 设备 没电 的 凌晨 三点钟 \n最 原始 的 旋律 在 胸腔 敲击 成 龙卷风 ",
6
+ "audio_duration": 172.64,
7
+ "infer_step": 60,
8
+ "guidance_scale": 15,
9
+ "scheduler_type": "euler",
10
+ "cfg_type": "apg",
11
+ "omega_scale": 10,
12
+ "guidance_interval": 0.65,
13
+ "guidance_interval_decay": 0,
14
+ "min_guidance_scale": 3,
15
+ "use_erg_tag": true,
16
+ "use_erg_lyric": false,
17
+ "use_erg_diffusion": true,
18
+ "oss_steps": [],
19
+ "timecosts": {
20
+ "preprocess": 3.648996353149414,
21
+ "diffusion": 16.44967818260193,
22
+ "latent2audio": 1.614703893661499
23
+ },
24
+ "actual_seeds": [
25
+ 1198023141
26
+ ],
27
+ "retake_seeds": [
28
+ 3389016134
29
+ ],
30
+ "retake_variance": 0.5,
31
+ "guidance_scale_text": 0,
32
+ "guidance_scale_lyric": 0,
33
+ "repaint_start": 0,
34
+ "repaint_end": 0,
35
+ "edit_n_min": 0.0,
36
+ "edit_n_max": 1.0,
37
+ "edit_n_avg": 1,
38
+ "src_audio_path": null,
39
+ "edit_target_prompt": null,
40
+ "edit_target_lyrics": null,
41
+ "audio2audio_enable": false,
42
+ "ref_audio_strength": 0.5,
43
+ "ref_audio_input": null,
44
+ "audio_path": "./outputs/output_20250513060150_0.wav"
45
+ }
pipeline_ace_step.py CHANGED
@@ -9,7 +9,7 @@ from loguru import logger
9
  from tqdm import tqdm
10
  import json
11
  import math
12
- from huggingface_hub import hf_hub_download
13
 
14
  # from diffusers.pipelines.pipeline_utils import DiffusionPipeline
15
  from schedulers.scheduling_flow_match_euler_discrete import FlowMatchEulerDiscreteScheduler
@@ -63,7 +63,6 @@ class ACEStepPipeline:
63
  else:
64
  checkpoint_dir = os.path.join(persistent_storage_path, "checkpoints")
65
  ensure_directory_exists(checkpoint_dir)
66
-
67
  self.checkpoint_dir = checkpoint_dir
68
  device = torch.device(f"cuda:{device_id}") if torch.cuda.is_available() else torch.device("cpu")
69
  if device.type == "cpu" and torch.backends.mps.is_available():
@@ -74,6 +73,22 @@ class ACEStepPipeline:
74
  self.device = device
75
  self.loaded = False
76
  self.torch_compile = torch_compile
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
  def load_checkpoint(self, checkpoint_dir=None):
79
  device = self.device
@@ -976,6 +991,10 @@ class ACEStepPipeline:
976
  oss_steps: str = None,
977
  guidance_scale_text: float = 0.0,
978
  guidance_scale_lyric: float = 0.0,
 
 
 
 
979
  retake_seeds: list = None,
980
  retake_variance: float = 0.5,
981
  task: str = "text2music",
@@ -1000,7 +1019,7 @@ class ACEStepPipeline:
1000
  self.load_checkpoint(self.checkpoint_dir)
1001
  load_model_cost = time.time() - start_time
1002
  logger.info(f"Model loaded in {load_model_cost:.2f} seconds.")
1003
-
1004
  start_time = time.time()
1005
 
1006
  random_generators, actual_seeds = self.set_seeds(batch_size, manual_seeds)
@@ -1053,6 +1072,14 @@ class ACEStepPipeline:
1053
  assert os.path.exists(src_audio_path), f"src_audio_path {src_audio_path} does not exist"
1054
  src_latents = self.infer_latents(src_audio_path)
1055
 
 
 
 
 
 
 
 
 
1056
  if task == "edit":
1057
  texts = [edit_target_prompt]
1058
  target_encoder_text_hidden_states, target_text_attention_mask = self.get_text_embeddings(texts, self.device)
@@ -1117,6 +1144,9 @@ class ACEStepPipeline:
1117
  repaint_start=repaint_start,
1118
  repaint_end=repaint_end,
1119
  src_latents=src_latents,
 
 
 
1120
  )
1121
 
1122
  end_time = time.time()
@@ -1139,6 +1169,7 @@ class ACEStepPipeline:
1139
  }
1140
 
1141
  input_params_json = {
 
1142
  "task": task,
1143
  "prompt": prompt if task != "edit" else edit_target_prompt,
1144
  "lyrics": lyrics if task != "edit" else edit_target_lyrics,
@@ -1169,6 +1200,9 @@ class ACEStepPipeline:
1169
  "src_audio_path": src_audio_path,
1170
  "edit_target_prompt": edit_target_prompt,
1171
  "edit_target_lyrics": edit_target_lyrics,
 
 
 
1172
  }
1173
  # save input_params_json
1174
  for output_audio_path in output_paths:
 
9
  from tqdm import tqdm
10
  import json
11
  import math
12
+ from huggingface_hub import hf_hub_download, snapshot_download
13
 
14
  # from diffusers.pipelines.pipeline_utils import DiffusionPipeline
15
  from schedulers.scheduling_flow_match_euler_discrete import FlowMatchEulerDiscreteScheduler
 
63
  else:
64
  checkpoint_dir = os.path.join(persistent_storage_path, "checkpoints")
65
  ensure_directory_exists(checkpoint_dir)
 
66
  self.checkpoint_dir = checkpoint_dir
67
  device = torch.device(f"cuda:{device_id}") if torch.cuda.is_available() else torch.device("cpu")
68
  if device.type == "cpu" and torch.backends.mps.is_available():
 
73
  self.device = device
74
  self.loaded = False
75
  self.torch_compile = torch_compile
76
+ self.lora_path = "none"
77
+
78
+ def load_lora(self, lora_name_or_path):
79
+ if lora_name_or_path != self.lora_path and lora_name_or_path != "none":
80
+ if not os.path.exists(lora_name_or_path):
81
+ lora_download_path = snapshot_download(lora_name_or_path, cache_dir=self.checkpoint_dir)
82
+ else:
83
+ lora_download_path = lora_name_or_path
84
+ if self.lora_path != "none":
85
+ self.ace_step_transformer.unload_lora()
86
+ self.ace_step_transformer.load_lora_adapter(os.path.join(lora_download_path, "pytorch_lora_weights.safetensors"), adapter_name="zh_rap_lora", with_alpha=True)
87
+ logger.info(f"Loading lora weights from: {lora_name_or_path} download path is: {lora_download_path}")
88
+ self.lora_path = lora_name_or_path
89
+ elif self.lora_path != "none" and lora_name_or_path == "none":
90
+ logger.info("No lora weights to load.")
91
+ self.ace_step_transformer.unload_lora()
92
 
93
  def load_checkpoint(self, checkpoint_dir=None):
94
  device = self.device
 
991
  oss_steps: str = None,
992
  guidance_scale_text: float = 0.0,
993
  guidance_scale_lyric: float = 0.0,
994
+ audio2audio_enable: bool = False,
995
+ ref_audio_strength: float = 0.5,
996
+ ref_audio_input: str = None,
997
+ lora_name_or_path: str = "none",
998
  retake_seeds: list = None,
999
  retake_variance: float = 0.5,
1000
  task: str = "text2music",
 
1019
  self.load_checkpoint(self.checkpoint_dir)
1020
  load_model_cost = time.time() - start_time
1021
  logger.info(f"Model loaded in {load_model_cost:.2f} seconds.")
1022
+ self.load_lora(lora_name_or_path)
1023
  start_time = time.time()
1024
 
1025
  random_generators, actual_seeds = self.set_seeds(batch_size, manual_seeds)
 
1072
  assert os.path.exists(src_audio_path), f"src_audio_path {src_audio_path} does not exist"
1073
  src_latents = self.infer_latents(src_audio_path)
1074
 
1075
+ ref_latents = None
1076
+ if ref_audio_input is not None and audio2audio_enable:
1077
+ assert ref_audio_input is not None, "ref_audio_input is required for audio2audio task"
1078
+ assert os.path.exists(
1079
+ ref_audio_input
1080
+ ), f"ref_audio_input {ref_audio_input} does not exist"
1081
+ ref_latents = self.infer_latents(ref_audio_input)
1082
+
1083
  if task == "edit":
1084
  texts = [edit_target_prompt]
1085
  target_encoder_text_hidden_states, target_text_attention_mask = self.get_text_embeddings(texts, self.device)
 
1144
  repaint_start=repaint_start,
1145
  repaint_end=repaint_end,
1146
  src_latents=src_latents,
1147
+ audio2audio_enable=audio2audio_enable,
1148
+ ref_audio_strength=ref_audio_strength,
1149
+ ref_latents=ref_latents,
1150
  )
1151
 
1152
  end_time = time.time()
 
1169
  }
1170
 
1171
  input_params_json = {
1172
+ "lora_name_or_path": lora_name_or_path,
1173
  "task": task,
1174
  "prompt": prompt if task != "edit" else edit_target_prompt,
1175
  "lyrics": lyrics if task != "edit" else edit_target_lyrics,
 
1200
  "src_audio_path": src_audio_path,
1201
  "edit_target_prompt": edit_target_prompt,
1202
  "edit_target_lyrics": edit_target_lyrics,
1203
+ "audio2audio_enable": audio2audio_enable,
1204
+ "ref_audio_strength": ref_audio_strength,
1205
+ "ref_audio_input": ref_audio_input,
1206
  }
1207
  # save input_params_json
1208
  for output_audio_path in output_paths:
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  datasets==3.4.1
2
  diffusers==0.32.2
3
- gradio==5.23.3
4
  librosa==0.11.0
5
  loguru==0.7.3
6
  matplotlib==3.10.1
@@ -11,7 +11,7 @@ soundfile==0.13.1
11
  torch
12
  torchaudio
13
  torchvision
14
- tqdm==4.67.1
15
  transformers==4.50.0
16
  py3langid==0.3.0
17
  hangul-romanize==0.1.0
@@ -20,3 +20,6 @@ spacy==3.8.4
20
  accelerate==1.6.0
21
  cutlet
22
  fugashi[unidic-lite]
 
 
 
 
1
  datasets==3.4.1
2
  diffusers==0.32.2
3
+ gradio
4
  librosa==0.11.0
5
  loguru==0.7.3
6
  matplotlib==3.10.1
 
11
  torch
12
  torchaudio
13
  torchvision
14
+ tqdm
15
  transformers==4.50.0
16
  py3langid==0.3.0
17
  hangul-romanize==0.1.0
 
20
  accelerate==1.6.0
21
  cutlet
22
  fugashi[unidic-lite]
23
+ peft
24
+ tensorboard
25
+ tensorboardX
test.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {'id': 'gen-1746104947-KKBqwgZ992wxV5m4PZga', 'provider': 'Google', 'model': 'google/gemini-2.5-flash-preview', 'object': 'chat.completion', 'created': 1746104947, 'choices': [{'logprobs': None, 'finish_reason': 'stop', 'native_finish_reason': 'STOP', 'index': 0, 'message': {'role': 'assistant', 'content': '```json\n[\n {\n "id": "1",\n "lyrics": "[Intro]\\nYo\\nCheck the mic, one two\\n你们欠我的总要还\\n[Chorus]\\n欠我的总要还\\n别想着逃跑\\n我来了带着我的flow\\n就像一场风暴\\n别再假装不知道\\n你们的演技太糟\\n今天我就让你知道\\n什么叫做报应到\\n[Verse 1]\\n还记得那天吗\\n我的付出你们全抛下\\n踩着我的头\\n往上爬\\n现在轮到我\\n来收账啦\\n那些虚伪的嘴脸\\n还在对我笑\\n却不知道报应\\n已经在敲门了\\n每一个背叛\\n都刻在我的心上\\n今天就是你们\\n付出代价的时候\\n[Pre-Chorus]\\n别求饶\\n别哭叫\\n这一切都是你们\\n自找的\\n[Chorus]\\n欠我的总要还\\n别想着逃跑\\n我来了带着我的flow\\n就像一场风暴\\n别再假装不知道\\n你们的演技太糟\\n今天我就让你知道\\n什么叫做报应到\\n[Outro]\\nHahaha\\nPayback time\\n你们跑不掉的\\n永远",\n "tags": "Rap, Hip Hop, Boombap, Ambient Synth Pads, Humorous, Revenge"\n },\n {\n "id": "120",\n "lyrics": "[Intro]\\nYeah\\nLet\'s take it back\\n回望过去的光景\\n[Verse 1]\\n曾经的街道\\n熟悉的味道\\n那些画面\\n在脑海里环绕\\n年轻的我们\\n充满着梦想\\n以为世界\\n就在我们的手掌\\n那段时光\\n单纯又美好\\n虽然 sometimes 很苦\\n但是我们都在笑\\n那些面孔\\n有些已不再联系\\n但他们的故事\\n依然在我记忆里\\n[Chorus]\\n回望过去\\n就像一部电影\\n有好有坏\\n有哭也有笑声\\n那些经历\\n塑造了今天的我\\n感谢一切\\n让我变得成熟\\n[Verse 2]\\n记得第一次心碎\\n在雨中流泪\\n记得第一次成功\\n那种喜悦滋味\\n记得那些争吵\\n也记得和解的拥抱\\n每一次跌倒\\n都教会我如何 STAND TALL\\n那些友情\\n那些爱情\\n都是我生命中\\n最珍贵的风景\\n[Bridge]\\n时间流逝\\n我们都在改变\\n但有些东西\\n永远不会变\\n初心还在\\n梦想还在\\n带着过去的经验\\n走向未来\\n[Chorus]\\n回望过去\\n就像一部电影\\n有好有坏\\n有哭也有笑声\\n那些经历\\n塑造了今天的我\\n感谢一切\\n让我变得成熟\\n[Outro]\\nLooking back\\nNever forget\\n那些日子\\n永远在我心里\\nYeah",\n "tags": "Rap, Hip Hop, Jazz Hop, Fast Tempo, Synth Lead, Traditional Instrument Samples, Storytelling, Looking Back"\n },\n {\n "id": "210",\n "lyrics": "[Intro]\\nYo\\nLet\'s go\\nParty started!\\n[Verse 1]\\n节奏快到爆炸\\n我的 Flow 像火箭一样发射\\n麦克风在我手里\\n就是我的武器\\n每一个字都像子弹\\n精准地击中你\\n从不放慢速度\\n只有一路狂飙\\n派对动物在欢呼\\n气氛越来越高潮\\n汗水湿透了衣裳\\n精力无限释放\\n今晚不回家\\n玩到天亮\\n[Chorus]\\n派对时间到了\\n跟着我的节奏摇摆\\n忘记所有烦恼\\n今晚我们主宰舞台\\n音乐声震耳欲聋\\n点燃激情和冲动\\n我们 unstoppable\\n像 electric guitar riff 的作用\\n[Verse 2]\\n别傻站着\\n加入我们的人潮\\n尽情扭动\\n释放你的 SIGNAL\\n不用在意别人眼光\\n做最真实的自己\\n这个夜晚\\n属于你的胜利\\n我的歌声在你耳边\\n就像电流穿梭\\n让你感受到力量\\n让你全身都着火\\n[Chorus]\\n派对时间到了\\n跟着我的节奏摇摆\\n忘记所有烦恼\\n今晚我们主宰舞台\\n音乐声震耳欲聋\\n点燃激情和冲动\\n我们 unstoppable\\n像 electric guitar riff 的作用\\n[Bridge]\\n从黑夜到黎明\\n我们的能量不会停\\n一直在前进\\n unstoppable 势不可挡\\n[Outro]\\nYeah\\nThat\'s right\\nParty never ends\\nLet\'s get it!",\n "tags": "Rap, Hip Hop, Fast Tempo, Chopper Flow, Sampled Vocal Hook, Electric Guitar Riff, Motivational, Chill, Relaxed, Party Scene"\n }\n]\n```', 'refusal': None, 'reasoning': None}}], 'usage': {'prompt_tokens': 1212, 'completion_tokens': 1121, 'total_tokens': 2333}}
ui/components.py CHANGED
@@ -1,5 +1,14 @@
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  import librosa
 
3
 
4
 
5
  TAG_DEFAULT = "funk, pop, soul, rock, melodic, guitar, drums, bass, keyboard, percussion, 105 BPM, energetic, upbeat, groovy, vibrant, dynamic"
@@ -40,7 +49,25 @@ Catch the tune and hold it tight
40
  In this moment we take flight
41
  """
42
 
43
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
 
46
  def create_output_ui(task_name="Text2Music"):
@@ -63,46 +90,229 @@ def create_text2music_ui(
63
  gr,
64
  text2music_process_func,
65
  sample_data_func=None,
 
66
  ):
 
 
 
 
 
 
 
 
 
67
  with gr.Row():
68
  with gr.Column():
69
  with gr.Row(equal_height=True):
70
  # add markdown, tags and lyrics examples are from ai music generation community
71
- audio_duration = gr.Slider(-1, 240.0, step=0.00001, value=-1, label="Audio Duration", interactive=True, info="-1 means random duration (30 ~ 240).", scale=9)
72
- sample_bnt = gr.Button("Sample", variant="primary", scale=1)
 
 
 
 
 
 
 
 
 
73
 
74
- prompt = gr.Textbox(lines=2, label="Tags", max_lines=4, value=TAG_DEFAULT, info="Support tags, descriptions, and scene. Use commas to separate different tags.\ntags and lyrics examples are from ai music generation community")
75
- lyrics = gr.Textbox(lines=9, label="Lyrics", max_lines=13, value=LYRIC_DEFAULT, info="Support lyric structure tags like [verse], [chorus], and [bridge] to separate different parts of the lyrics.\nUse [instrumental] or [inst] to generate instrumental music. Not support genre structure tag in lyrics")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  with gr.Accordion("Basic Settings", open=False):
78
- infer_step = gr.Slider(minimum=1, maximum=60, step=1, value=27, label="Infer Steps", interactive=True)
79
- guidance_scale = gr.Slider(minimum=0.0, maximum=200.0, step=0.1, value=15.0, label="Guidance Scale", interactive=True, info="When guidance_scale_lyric > 1 and guidance_scale_text > 1, the guidance scale will not be applied.")
80
- guidance_scale_text = gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=0.0, label="Guidance Scale Text", interactive=True, info="Guidance scale for text condition. It can only apply to cfg. set guidance_scale_text=5.0, guidance_scale_lyric=1.5 for start")
81
- guidance_scale_lyric = gr.Slider(minimum=0.0, maximum=10.0, step=0.1, value=0.0, label="Guidance Scale Lyric", interactive=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
- manual_seeds = gr.Textbox(label="manual seeds (default None)", placeholder="1,2,3,4", value=None, info="Seed for the generation")
 
 
 
 
 
84
 
85
  with gr.Accordion("Advanced Settings", open=False):
86
- scheduler_type = gr.Radio(["euler", "heun"], value="euler", label="Scheduler Type", elem_id="scheduler_type", info="Scheduler type for the generation. euler is recommended. heun will take more time.")
87
- cfg_type = gr.Radio(["cfg", "apg", "cfg_star"], value="apg", label="CFG Type", elem_id="cfg_type", info="CFG type for the generation. apg is recommended. cfg and cfg_star are almost the same.")
88
- use_erg_tag = gr.Checkbox(label="use ERG for tag", value=True, info="Use Entropy Rectifying Guidance for tag. It will multiple a temperature to the attention to make a weaker tag condition and make better diversity.")
89
- use_erg_lyric = gr.Checkbox(label="use ERG for lyric", value=True, info="The same but apply to lyric encoder's attention.")
90
- use_erg_diffusion = gr.Checkbox(label="use ERG for diffusion", value=True, info="The same but apply to diffusion model's attention.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
- omega_scale = gr.Slider(minimum=-100.0, maximum=100.0, step=0.1, value=10.0, label="Granularity Scale", interactive=True, info="Granularity scale for the generation. Higher values can reduce artifacts")
 
 
 
 
 
 
 
 
93
 
94
- guidance_interval = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.5, label="Guidance Interval", interactive=True, info="Guidance interval for the generation. 0.5 means only apply guidance in the middle steps (0.25 * infer_steps to 0.75 * infer_steps)")
95
- guidance_interval_decay = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.0, label="Guidance Interval Decay", interactive=True, info="Guidance interval decay for the generation. Guidance scale will decay from guidance_scale to min_guidance_scale in the interval. 0.0 means no decay.")
96
- min_guidance_scale = gr.Slider(minimum=0.0, maximum=200.0, step=0.1, value=3.0, label="Min Guidance Scale", interactive=True, info="Min guidance scale for guidance interval decay's end scale")
97
- oss_steps = gr.Textbox(label="OSS Steps", placeholder="16, 29, 52, 96, 129, 158, 172, 183, 189, 200", value=None, info="Optimal Steps for the generation. But not test well")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
 
99
  text2music_bnt = gr.Button("Generate", variant="primary")
100
 
101
  with gr.Column():
102
  outputs, input_params_json = create_output_ui()
103
  with gr.Tab("retake"):
104
- retake_variance = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.2, label="variance")
105
- retake_seeds = gr.Textbox(label="retake seeds (default None)", placeholder="", value=None)
 
 
 
 
106
  retake_bnt = gr.Button("Retake", variant="primary")
107
  retake_outputs, retake_input_params_json = create_output_ui("Retake")
108
 
@@ -124,13 +334,22 @@ def create_text2music_ui(
124
  json_data["use_erg_lyric"],
125
  json_data["use_erg_diffusion"],
126
  ", ".join(map(str, json_data["oss_steps"])),
127
- json_data["guidance_scale_text"] if "guidance_scale_text" in json_data else 0.0,
128
- json_data["guidance_scale_lyric"] if "guidance_scale_lyric" in json_data else 0.0,
 
 
 
 
 
 
 
 
129
  retake_seeds=retake_seeds,
130
  retake_variance=retake_variance,
131
  task="retake",
 
132
  )
133
-
134
  retake_bnt.click(
135
  fn=retake_process_func,
136
  inputs=[
@@ -141,15 +360,46 @@ def create_text2music_ui(
141
  outputs=retake_outputs + [retake_input_params_json],
142
  )
143
  with gr.Tab("repainting"):
144
- retake_variance = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.2, label="variance")
145
- retake_seeds = gr.Textbox(label="repaint seeds (default None)", placeholder="", value=None)
146
- repaint_start = gr.Slider(minimum=0.0, maximum=240.0, step=0.01, value=0.0, label="Repaint Start Time", interactive=True)
147
- repaint_end = gr.Slider(minimum=0.0, maximum=240.0, step=0.01, value=30.0, label="Repaint End Time", interactive=True)
148
- repaint_source = gr.Radio(["text2music", "last_repaint", "upload"], value="text2music", label="Repaint Source", elem_id="repaint_source")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
149
 
150
- repaint_source_audio_upload = gr.Audio(label="Upload Audio", type="filepath", visible=False, elem_id="repaint_source_audio_upload")
 
 
 
 
 
 
151
  repaint_source.change(
152
- fn=lambda x: gr.update(visible=x == "upload", elem_id="repaint_source_audio_upload"),
 
 
153
  inputs=[repaint_source],
154
  outputs=[repaint_source_audio_upload],
155
  )
@@ -187,9 +437,7 @@ def create_text2music_ui(
187
  if repaint_source == "upload":
188
  src_audio_path = repaint_source_audio_upload
189
  audio_duration = librosa.get_duration(filename=src_audio_path)
190
- json_data = {
191
- "audio_duration": audio_duration
192
- }
193
  elif repaint_source == "text2music":
194
  json_data = text2music_json_data
195
  src_audio_path = json_data["audio_path"]
@@ -222,6 +470,7 @@ def create_text2music_ui(
222
  repaint_start=repaint_start,
223
  repaint_end=repaint_end,
224
  src_audio_path=src_audio_path,
 
225
  )
226
 
227
  repaint_bnt.click(
@@ -258,11 +507,33 @@ def create_text2music_ui(
258
  with gr.Tab("edit"):
259
  edit_prompt = gr.Textbox(lines=2, label="Edit Tags", max_lines=4)
260
  edit_lyrics = gr.Textbox(lines=9, label="Edit Lyrics", max_lines=13)
261
- retake_seeds = gr.Textbox(label="edit seeds (default None)", placeholder="", value=None)
 
 
262
 
263
- edit_type = gr.Radio(["only_lyrics", "remix"], value="only_lyrics", label="Edit Type", elem_id="edit_type", info="`only_lyrics` will keep the whole song the same except lyrics difference. Make your diffrence smaller, e.g. one lyrc line change.\nremix can change the song melody and genre")
264
- edit_n_min = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=0.6, label="edit_n_min", interactive=True)
265
- edit_n_max = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, value=1.0, label="edit_n_max", interactive=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
266
 
267
  def edit_type_change_func(edit_type):
268
  if edit_type == "only_lyrics":
@@ -276,13 +547,26 @@ def create_text2music_ui(
276
  edit_type.change(
277
  edit_type_change_func,
278
  inputs=[edit_type],
279
- outputs=[edit_n_min, edit_n_max]
280
  )
281
 
282
- edit_source = gr.Radio(["text2music", "last_edit", "upload"], value="text2music", label="Edit Source", elem_id="edit_source")
283
- edit_source_audio_upload = gr.Audio(label="Upload Audio", type="filepath", visible=False, elem_id="edit_source_audio_upload")
 
 
 
 
 
 
 
 
 
 
 
284
  edit_source.change(
285
- fn=lambda x: gr.update(visible=x == "upload", elem_id="edit_source_audio_upload"),
 
 
286
  inputs=[edit_source],
287
  outputs=[edit_source_audio_upload],
288
  )
@@ -321,9 +605,7 @@ def create_text2music_ui(
321
  if edit_source == "upload":
322
  src_audio_path = edit_source_audio_upload
323
  audio_duration = librosa.get_duration(filename=src_audio_path)
324
- json_data = {
325
- "audio_duration": audio_duration
326
- }
327
  elif edit_source == "text2music":
328
  json_data = text2music_json_data
329
  src_audio_path = json_data["audio_path"]
@@ -362,6 +644,7 @@ def create_text2music_ui(
362
  edit_n_min=edit_n_min,
363
  edit_n_max=edit_n_max,
364
  retake_seeds=retake_seeds,
 
365
  )
366
 
367
  edit_bnt.click(
@@ -397,14 +680,43 @@ def create_text2music_ui(
397
  outputs=edit_outputs + [edit_input_params_json],
398
  )
399
  with gr.Tab("extend"):
400
- extend_seeds = gr.Textbox(label="extend seeds (default None)", placeholder="", value=None)
401
- left_extend_length = gr.Slider(minimum=0.0, maximum=240.0, step=0.01, value=0.0, label="Left Extend Length", interactive=True)
402
- right_extend_length = gr.Slider(minimum=0.0, maximum=240.0, step=0.01, value=30.0, label="Right Extend Length", interactive=True)
403
- extend_source = gr.Radio(["text2music", "last_extend", "upload"], value="text2music", label="Extend Source", elem_id="extend_source")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
 
405
- extend_source_audio_upload = gr.Audio(label="Upload Audio", type="filepath", visible=False, elem_id="extend_source_audio_upload")
 
 
 
 
 
 
406
  extend_source.change(
407
- fn=lambda x: gr.update(visible=x == "upload", elem_id="extend_source_audio_upload"),
 
 
408
  inputs=[extend_source],
409
  outputs=[extend_source_audio_upload],
410
  )
@@ -442,9 +754,7 @@ def create_text2music_ui(
442
  src_audio_path = extend_source_audio_upload
443
  # get audio duration
444
  audio_duration = librosa.get_duration(filename=src_audio_path)
445
- json_data = {
446
- "audio_duration": audio_duration
447
- }
448
  elif extend_source == "text2music":
449
  json_data = text2music_json_data
450
  src_audio_path = json_data["audio_path"]
@@ -479,6 +789,7 @@ def create_text2music_ui(
479
  repaint_start=repaint_start,
480
  repaint_end=repaint_end,
481
  src_audio_path=src_audio_path,
 
482
  )
483
 
484
  extend_bnt.click(
@@ -512,8 +823,7 @@ def create_text2music_ui(
512
  outputs=extend_outputs + [extend_input_params_json],
513
  )
514
 
515
- def sample_data():
516
- json_data = sample_data_func()
517
  return (
518
  json_data["audio_duration"],
519
  json_data["prompt"],
@@ -531,12 +841,73 @@ def create_text2music_ui(
531
  json_data["use_erg_lyric"],
532
  json_data["use_erg_diffusion"],
533
  ", ".join(map(str, json_data["oss_steps"])),
534
- json_data["guidance_scale_text"] if "guidance_scale_text" in json_data else 0.0,
535
- json_data["guidance_scale_lyric"] if "guidance_scale_lyric" in json_data else 0.0,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
536
  )
537
 
 
 
 
 
538
  sample_bnt.click(
539
  sample_data,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
540
  outputs=[
541
  audio_duration,
542
  prompt,
@@ -556,6 +927,9 @@ def create_text2music_ui(
556
  oss_steps,
557
  guidance_scale_text,
558
  guidance_scale_lyric,
 
 
 
559
  ],
560
  )
561
 
@@ -580,13 +954,19 @@ def create_text2music_ui(
580
  oss_steps,
581
  guidance_scale_text,
582
  guidance_scale_lyric,
583
- ], outputs=outputs + [input_params_json]
 
 
 
 
 
584
  )
585
 
586
 
587
  def create_main_demo_ui(
588
  text2music_process_func=dump_func,
589
  sample_data_func=dump_func,
 
590
  ):
591
  with gr.Blocks(
592
  title="ACE-Step Model 1.0 DEMO",
@@ -594,18 +974,14 @@ def create_main_demo_ui(
594
  gr.Markdown(
595
  """
596
  <h1 style="text-align: center;">ACE-Step: A Step Towards Music Generation Foundation Model</h1>
597
- <p>
598
- <a href="https://ace-step.github.io/">Project</a> |
599
- <a href="https://huggingface.co/ACE-Step/ACE-Step-v1-3.5B">Checkpoints</a> |
600
- <a href="https://discord.gg/rjAZz2xBdG">Discord</a>
601
- </p>
602
- """)
603
-
604
  with gr.Tab("text2music"):
605
  create_text2music_ui(
606
  gr=gr,
607
  text2music_process_func=text2music_process_func,
608
  sample_data_func=sample_data_func,
 
609
  )
610
  return demo
611
 
 
1
+ """
2
+ ACE-Step: A Step Towards Music Generation Foundation Model
3
+
4
+ https://github.com/ace-step/ACE-Step
5
+
6
+ Apache 2.0 License
7
+ """
8
+
9
  import gradio as gr
10
  import librosa
11
+ import os
12
 
13
 
14
  TAG_DEFAULT = "funk, pop, soul, rock, melodic, guitar, drums, bass, keyboard, percussion, 105 BPM, energetic, upbeat, groovy, vibrant, dynamic"
 
49
  In this moment we take flight
50
  """
51
 
52
+ # First, let's define the presets at the top of the file, after the imports
53
+ GENRE_PRESETS = {
54
+ "Modern Pop": "pop, synth, drums, guitar, 120 bpm, upbeat, catchy, vibrant, female vocals, polished vocals",
55
+ "Rock": "rock, electric guitar, drums, bass, 130 bpm, energetic, rebellious, gritty, male vocals, raw vocals",
56
+ "Hip Hop": "hip hop, 808 bass, hi-hats, synth, 90 bpm, bold, urban, intense, male vocals, rhythmic vocals",
57
+ "Country": "country, acoustic guitar, steel guitar, fiddle, 100 bpm, heartfelt, rustic, warm, male vocals, twangy vocals",
58
+ "EDM": "edm, synth, bass, kick drum, 128 bpm, euphoric, pulsating, energetic, instrumental",
59
+ "Reggae": "reggae, guitar, bass, drums, 80 bpm, chill, soulful, positive, male vocals, smooth vocals",
60
+ "Classical": "classical, orchestral, strings, piano, 60 bpm, elegant, emotive, timeless, instrumental",
61
+ "Jazz": "jazz, saxophone, piano, double bass, 110 bpm, smooth, improvisational, soulful, male vocals, crooning vocals",
62
+ "Metal": "metal, electric guitar, double kick drum, bass, 160 bpm, aggressive, intense, heavy, male vocals, screamed vocals",
63
+ "R&B": "r&b, synth, bass, drums, 85 bpm, sultry, groovy, romantic, female vocals, silky vocals"
64
+ }
65
+
66
+ # Add this function to handle preset selection
67
+ def update_tags_from_preset(preset_name):
68
+ if preset_name == "Custom":
69
+ return ""
70
+ return GENRE_PRESETS.get(preset_name, "")
71
 
72
 
73
  def create_output_ui(task_name="Text2Music"):
 
90
  gr,
91
  text2music_process_func,
92
  sample_data_func=None,
93
+ load_data_func=None,
94
  ):
95
+
96
+ with gr.Row(equal_height=True):
97
+ curr_file_dir = os.path.dirname(__file__)
98
+ output_file_dir = os.path.join(curr_file_dir, "..", "..", "outputs")
99
+ json_files = [f for f in os.listdir(output_file_dir) if f.endswith('.json')]
100
+ json_files.sort(reverse=True, key=lambda x: int(x.split('_')[1]))
101
+ output_files = gr.Dropdown(choices=json_files, label="Select previous generated input params", scale=9, interactive=True)
102
+ load_bnt = gr.Button("Load", variant="primary", scale=1)
103
+
104
  with gr.Row():
105
  with gr.Column():
106
  with gr.Row(equal_height=True):
107
  # add markdown, tags and lyrics examples are from ai music generation community
108
+ audio_duration = gr.Slider(
109
+ -1,
110
+ 240.0,
111
+ step=0.00001,
112
+ value=-1,
113
+ label="Audio Duration",
114
+ interactive=True,
115
+ info="-1 means random duration (30 ~ 240).",
116
+ scale=9,
117
+ )
118
+ sample_bnt = gr.Button("Sample", variant="secondary", scale=1)
119
 
120
+ # audio2audio
121
+ with gr.Row(equal_height=True):
122
+ audio2audio_enable = gr.Checkbox(label="Enable Audio2Audio", value=False, info="Check to enable Audio-to-Audio generation using a reference audio.", elem_id="audio2audio_checkbox")
123
+ lora_name_or_path = gr.Dropdown(
124
+ label="Lora Name or Path",
125
+ choices=["ACE-Step/ACE-Step-v1-chinese-rap-LoRA", "none"],
126
+ value="none",
127
+ allow_custom_value=True,
128
+ )
129
+
130
+ ref_audio_input = gr.Audio(type="filepath", label="Reference Audio (for Audio2Audio)", visible=False, elem_id="ref_audio_input", show_download_button=True)
131
+ ref_audio_strength = gr.Slider(
132
+ label="Refer audio strength",
133
+ minimum=0.0,
134
+ maximum=1.0,
135
+ step=0.01,
136
+ value=0.5,
137
+ elem_id="ref_audio_strength",
138
+ visible=False,
139
+ interactive=True,
140
+ )
141
+
142
+ def toggle_ref_audio_visibility(is_checked):
143
+ return (
144
+ gr.update(visible=is_checked, elem_id="ref_audio_input"),
145
+ gr.update(visible=is_checked, elem_id="ref_audio_strength"),
146
+ )
147
+
148
+ audio2audio_enable.change(
149
+ fn=toggle_ref_audio_visibility,
150
+ inputs=[audio2audio_enable],
151
+ outputs=[ref_audio_input, ref_audio_strength],
152
+ )
153
+
154
+ with gr.Column(scale=2):
155
+ with gr.Group():
156
+ gr.Markdown("""<center>Support tags, descriptions, and scene. Use commas to separate different tags.<br>Tags and lyrics examples are from AI music generation community.</center>""")
157
+ with gr.Row():
158
+ genre_preset = gr.Dropdown(
159
+ choices=["Custom"] + list(GENRE_PRESETS.keys()),
160
+ value="Custom",
161
+ label="Preset",
162
+ scale=1,
163
+ )
164
+ prompt = gr.Textbox(
165
+ lines=1,
166
+ label="Tags",
167
+ max_lines=4,
168
+ value=TAG_DEFAULT,
169
+ scale=9,
170
+ )
171
+
172
+ # Add the change event for the preset dropdown
173
+ genre_preset.change(
174
+ fn=update_tags_from_preset,
175
+ inputs=[genre_preset],
176
+ outputs=[prompt]
177
+ )
178
+ with gr.Group():
179
+ gr.Markdown("""<center>Support lyric structure tags like [verse], [chorus], and [bridge] to separate different parts of the lyrics.<br>Use [instrumental] or [inst] to generate instrumental music. Not support genre structure tag in lyrics</center>""")
180
+ lyrics = gr.Textbox(
181
+ lines=9,
182
+ label="Lyrics",
183
+ max_lines=13,
184
+ value=LYRIC_DEFAULT,
185
+ )
186
 
187
  with gr.Accordion("Basic Settings", open=False):
188
+ infer_step = gr.Slider(
189
+ minimum=1,
190
+ maximum=200,
191
+ step=1,
192
+ value=60,
193
+ label="Infer Steps",
194
+ interactive=True,
195
+ )
196
+ guidance_scale = gr.Slider(
197
+ minimum=0.0,
198
+ maximum=30.0,
199
+ step=0.1,
200
+ value=15.0,
201
+ label="Guidance Scale",
202
+ interactive=True,
203
+ info="When guidance_scale_lyric > 1 and guidance_scale_text > 1, the guidance scale will not be applied.",
204
+ )
205
+ guidance_scale_text = gr.Slider(
206
+ minimum=0.0,
207
+ maximum=10.0,
208
+ step=0.1,
209
+ value=0.0,
210
+ label="Guidance Scale Text",
211
+ interactive=True,
212
+ info="Guidance scale for text condition. It can only apply to cfg. set guidance_scale_text=5.0, guidance_scale_lyric=1.5 for start",
213
+ )
214
+ guidance_scale_lyric = gr.Slider(
215
+ minimum=0.0,
216
+ maximum=10.0,
217
+ step=0.1,
218
+ value=0.0,
219
+ label="Guidance Scale Lyric",
220
+ interactive=True,
221
+ )
222
 
223
+ manual_seeds = gr.Textbox(
224
+ label="manual seeds (default None)",
225
+ placeholder="1,2,3,4",
226
+ value=None,
227
+ info="Seed for the generation",
228
+ )
229
 
230
  with gr.Accordion("Advanced Settings", open=False):
231
+ scheduler_type = gr.Radio(
232
+ ["euler", "heun"],
233
+ value="euler",
234
+ label="Scheduler Type",
235
+ elem_id="scheduler_type",
236
+ info="Scheduler type for the generation. euler is recommended. heun will take more time.",
237
+ )
238
+ cfg_type = gr.Radio(
239
+ ["cfg", "apg", "cfg_star"],
240
+ value="apg",
241
+ label="CFG Type",
242
+ elem_id="cfg_type",
243
+ info="CFG type for the generation. apg is recommended. cfg and cfg_star are almost the same.",
244
+ )
245
+ use_erg_tag = gr.Checkbox(
246
+ label="use ERG for tag",
247
+ value=True,
248
+ info="Use Entropy Rectifying Guidance for tag. It will multiple a temperature to the attention to make a weaker tag condition and make better diversity.",
249
+ )
250
+ use_erg_lyric = gr.Checkbox(
251
+ label="use ERG for lyric",
252
+ value=False,
253
+ info="The same but apply to lyric encoder's attention.",
254
+ )
255
+ use_erg_diffusion = gr.Checkbox(
256
+ label="use ERG for diffusion",
257
+ value=True,
258
+ info="The same but apply to diffusion model's attention.",
259
+ )
260
 
261
+ omega_scale = gr.Slider(
262
+ minimum=-100.0,
263
+ maximum=100.0,
264
+ step=0.1,
265
+ value=10.0,
266
+ label="Granularity Scale",
267
+ interactive=True,
268
+ info="Granularity scale for the generation. Higher values can reduce artifacts",
269
+ )
270
 
271
+ guidance_interval = gr.Slider(
272
+ minimum=0.0,
273
+ maximum=1.0,
274
+ step=0.01,
275
+ value=0.5,
276
+ label="Guidance Interval",
277
+ interactive=True,
278
+ info="Guidance interval for the generation. 0.5 means only apply guidance in the middle steps (0.25 * infer_steps to 0.75 * infer_steps)",
279
+ )
280
+ guidance_interval_decay = gr.Slider(
281
+ minimum=0.0,
282
+ maximum=1.0,
283
+ step=0.01,
284
+ value=0.0,
285
+ label="Guidance Interval Decay",
286
+ interactive=True,
287
+ info="Guidance interval decay for the generation. Guidance scale will decay from guidance_scale to min_guidance_scale in the interval. 0.0 means no decay.",
288
+ )
289
+ min_guidance_scale = gr.Slider(
290
+ minimum=0.0,
291
+ maximum=200.0,
292
+ step=0.1,
293
+ value=3.0,
294
+ label="Min Guidance Scale",
295
+ interactive=True,
296
+ info="Min guidance scale for guidance interval decay's end scale",
297
+ )
298
+ oss_steps = gr.Textbox(
299
+ label="OSS Steps",
300
+ placeholder="16, 29, 52, 96, 129, 158, 172, 183, 189, 200",
301
+ value=None,
302
+ info="Optimal Steps for the generation. But not test well",
303
+ )
304
 
305
  text2music_bnt = gr.Button("Generate", variant="primary")
306
 
307
  with gr.Column():
308
  outputs, input_params_json = create_output_ui()
309
  with gr.Tab("retake"):
310
+ retake_variance = gr.Slider(
311
+ minimum=0.0, maximum=1.0, step=0.01, value=0.2, label="variance"
312
+ )
313
+ retake_seeds = gr.Textbox(
314
+ label="retake seeds (default None)", placeholder="", value=None
315
+ )
316
  retake_bnt = gr.Button("Retake", variant="primary")
317
  retake_outputs, retake_input_params_json = create_output_ui("Retake")
318
 
 
334
  json_data["use_erg_lyric"],
335
  json_data["use_erg_diffusion"],
336
  ", ".join(map(str, json_data["oss_steps"])),
337
+ (
338
+ json_data["guidance_scale_text"]
339
+ if "guidance_scale_text" in json_data
340
+ else 0.0
341
+ ),
342
+ (
343
+ json_data["guidance_scale_lyric"]
344
+ if "guidance_scale_lyric" in json_data
345
+ else 0.0
346
+ ),
347
  retake_seeds=retake_seeds,
348
  retake_variance=retake_variance,
349
  task="retake",
350
+ lora_name_or_path="none" if "lora_name_or_path" not in json_data else json_data["lora_name_or_path"]
351
  )
352
+
353
  retake_bnt.click(
354
  fn=retake_process_func,
355
  inputs=[
 
360
  outputs=retake_outputs + [retake_input_params_json],
361
  )
362
  with gr.Tab("repainting"):
363
+ retake_variance = gr.Slider(
364
+ minimum=0.0, maximum=1.0, step=0.01, value=0.2, label="variance"
365
+ )
366
+ retake_seeds = gr.Textbox(
367
+ label="repaint seeds (default None)", placeholder="", value=None
368
+ )
369
+ repaint_start = gr.Slider(
370
+ minimum=0.0,
371
+ maximum=240.0,
372
+ step=0.01,
373
+ value=0.0,
374
+ label="Repaint Start Time",
375
+ interactive=True,
376
+ )
377
+ repaint_end = gr.Slider(
378
+ minimum=0.0,
379
+ maximum=240.0,
380
+ step=0.01,
381
+ value=30.0,
382
+ label="Repaint End Time",
383
+ interactive=True,
384
+ )
385
+ repaint_source = gr.Radio(
386
+ ["text2music", "last_repaint", "upload"],
387
+ value="text2music",
388
+ label="Repaint Source",
389
+ elem_id="repaint_source",
390
+ )
391
 
392
+ repaint_source_audio_upload = gr.Audio(
393
+ label="Upload Audio",
394
+ type="filepath",
395
+ visible=False,
396
+ elem_id="repaint_source_audio_upload",
397
+ show_download_button=True,
398
+ )
399
  repaint_source.change(
400
+ fn=lambda x: gr.update(
401
+ visible=x == "upload", elem_id="repaint_source_audio_upload"
402
+ ),
403
  inputs=[repaint_source],
404
  outputs=[repaint_source_audio_upload],
405
  )
 
437
  if repaint_source == "upload":
438
  src_audio_path = repaint_source_audio_upload
439
  audio_duration = librosa.get_duration(filename=src_audio_path)
440
+ json_data = {"audio_duration": audio_duration}
 
 
441
  elif repaint_source == "text2music":
442
  json_data = text2music_json_data
443
  src_audio_path = json_data["audio_path"]
 
470
  repaint_start=repaint_start,
471
  repaint_end=repaint_end,
472
  src_audio_path=src_audio_path,
473
+ lora_name_or_path="none" if "lora_name_or_path" not in json_data else json_data["lora_name_or_path"]
474
  )
475
 
476
  repaint_bnt.click(
 
507
  with gr.Tab("edit"):
508
  edit_prompt = gr.Textbox(lines=2, label="Edit Tags", max_lines=4)
509
  edit_lyrics = gr.Textbox(lines=9, label="Edit Lyrics", max_lines=13)
510
+ retake_seeds = gr.Textbox(
511
+ label="edit seeds (default None)", placeholder="", value=None
512
+ )
513
 
514
+ edit_type = gr.Radio(
515
+ ["only_lyrics", "remix"],
516
+ value="only_lyrics",
517
+ label="Edit Type",
518
+ elem_id="edit_type",
519
+ info="`only_lyrics` will keep the whole song the same except lyrics difference. Make your diffrence smaller, e.g. one lyrc line change.\nremix can change the song melody and genre",
520
+ )
521
+ edit_n_min = gr.Slider(
522
+ minimum=0.0,
523
+ maximum=1.0,
524
+ step=0.01,
525
+ value=0.6,
526
+ label="edit_n_min",
527
+ interactive=True,
528
+ )
529
+ edit_n_max = gr.Slider(
530
+ minimum=0.0,
531
+ maximum=1.0,
532
+ step=0.01,
533
+ value=1.0,
534
+ label="edit_n_max",
535
+ interactive=True,
536
+ )
537
 
538
  def edit_type_change_func(edit_type):
539
  if edit_type == "only_lyrics":
 
547
  edit_type.change(
548
  edit_type_change_func,
549
  inputs=[edit_type],
550
+ outputs=[edit_n_min, edit_n_max],
551
  )
552
 
553
+ edit_source = gr.Radio(
554
+ ["text2music", "last_edit", "upload"],
555
+ value="text2music",
556
+ label="Edit Source",
557
+ elem_id="edit_source",
558
+ )
559
+ edit_source_audio_upload = gr.Audio(
560
+ label="Upload Audio",
561
+ type="filepath",
562
+ visible=False,
563
+ elem_id="edit_source_audio_upload",
564
+ show_download_button=True,
565
+ )
566
  edit_source.change(
567
+ fn=lambda x: gr.update(
568
+ visible=x == "upload", elem_id="edit_source_audio_upload"
569
+ ),
570
  inputs=[edit_source],
571
  outputs=[edit_source_audio_upload],
572
  )
 
605
  if edit_source == "upload":
606
  src_audio_path = edit_source_audio_upload
607
  audio_duration = librosa.get_duration(filename=src_audio_path)
608
+ json_data = {"audio_duration": audio_duration}
 
 
609
  elif edit_source == "text2music":
610
  json_data = text2music_json_data
611
  src_audio_path = json_data["audio_path"]
 
644
  edit_n_min=edit_n_min,
645
  edit_n_max=edit_n_max,
646
  retake_seeds=retake_seeds,
647
+ lora_name_or_path="none" if "lora_name_or_path" not in json_data else json_data["lora_name_or_path"]
648
  )
649
 
650
  edit_bnt.click(
 
680
  outputs=edit_outputs + [edit_input_params_json],
681
  )
682
  with gr.Tab("extend"):
683
+ extend_seeds = gr.Textbox(
684
+ label="extend seeds (default None)", placeholder="", value=None
685
+ )
686
+ left_extend_length = gr.Slider(
687
+ minimum=0.0,
688
+ maximum=240.0,
689
+ step=0.01,
690
+ value=0.0,
691
+ label="Left Extend Length",
692
+ interactive=True,
693
+ )
694
+ right_extend_length = gr.Slider(
695
+ minimum=0.0,
696
+ maximum=240.0,
697
+ step=0.01,
698
+ value=30.0,
699
+ label="Right Extend Length",
700
+ interactive=True,
701
+ )
702
+ extend_source = gr.Radio(
703
+ ["text2music", "last_extend", "upload"],
704
+ value="text2music",
705
+ label="Extend Source",
706
+ elem_id="extend_source",
707
+ )
708
 
709
+ extend_source_audio_upload = gr.Audio(
710
+ label="Upload Audio",
711
+ type="filepath",
712
+ visible=False,
713
+ elem_id="extend_source_audio_upload",
714
+ show_download_button=True,
715
+ )
716
  extend_source.change(
717
+ fn=lambda x: gr.update(
718
+ visible=x == "upload", elem_id="extend_source_audio_upload"
719
+ ),
720
  inputs=[extend_source],
721
  outputs=[extend_source_audio_upload],
722
  )
 
754
  src_audio_path = extend_source_audio_upload
755
  # get audio duration
756
  audio_duration = librosa.get_duration(filename=src_audio_path)
757
+ json_data = {"audio_duration": audio_duration}
 
 
758
  elif extend_source == "text2music":
759
  json_data = text2music_json_data
760
  src_audio_path = json_data["audio_path"]
 
789
  repaint_start=repaint_start,
790
  repaint_end=repaint_end,
791
  src_audio_path=src_audio_path,
792
+ lora_name_or_path="none" if "lora_name_or_path" not in json_data else json_data["lora_name_or_path"]
793
  )
794
 
795
  extend_bnt.click(
 
823
  outputs=extend_outputs + [extend_input_params_json],
824
  )
825
 
826
+ def json2output(json_data):
 
827
  return (
828
  json_data["audio_duration"],
829
  json_data["prompt"],
 
841
  json_data["use_erg_lyric"],
842
  json_data["use_erg_diffusion"],
843
  ", ".join(map(str, json_data["oss_steps"])),
844
+ (
845
+ json_data["guidance_scale_text"]
846
+ if "guidance_scale_text" in json_data
847
+ else 0.0
848
+ ),
849
+ (
850
+ json_data["guidance_scale_lyric"]
851
+ if "guidance_scale_lyric" in json_data
852
+ else 0.0
853
+ ),
854
+ (
855
+ json_data["audio2audio_enable"]
856
+ if "audio2audio_enable" in json_data
857
+ else False
858
+ ),
859
+ (
860
+ json_data["ref_audio_strength"]
861
+ if "ref_audio_strength" in json_data
862
+ else 0.5
863
+ ),
864
+ (
865
+ json_data["ref_audio_input"]
866
+ if "ref_audio_input" in json_data
867
+ else None
868
+ ),
869
  )
870
 
871
+ def sample_data(lora_name_or_path_):
872
+ json_data = sample_data_func(lora_name_or_path_)
873
+ return json2output(json_data)
874
+
875
  sample_bnt.click(
876
  sample_data,
877
+ inputs=[lora_name_or_path],
878
+ outputs=[
879
+ audio_duration,
880
+ prompt,
881
+ lyrics,
882
+ infer_step,
883
+ guidance_scale,
884
+ scheduler_type,
885
+ cfg_type,
886
+ omega_scale,
887
+ manual_seeds,
888
+ guidance_interval,
889
+ guidance_interval_decay,
890
+ min_guidance_scale,
891
+ use_erg_tag,
892
+ use_erg_lyric,
893
+ use_erg_diffusion,
894
+ oss_steps,
895
+ guidance_scale_text,
896
+ guidance_scale_lyric,
897
+ audio2audio_enable,
898
+ ref_audio_strength,
899
+ ref_audio_input,
900
+ ],
901
+ )
902
+
903
+ def load_data(json_file):
904
+ json_file = os.path.join(output_file_dir, json_file)
905
+ json_data = load_data_func(json_file)
906
+ return json2output(json_data)
907
+
908
+ load_bnt.click(
909
+ fn=load_data,
910
+ inputs=[output_files],
911
  outputs=[
912
  audio_duration,
913
  prompt,
 
927
  oss_steps,
928
  guidance_scale_text,
929
  guidance_scale_lyric,
930
+ audio2audio_enable,
931
+ ref_audio_strength,
932
+ ref_audio_input,
933
  ],
934
  )
935
 
 
954
  oss_steps,
955
  guidance_scale_text,
956
  guidance_scale_lyric,
957
+ audio2audio_enable,
958
+ ref_audio_strength,
959
+ ref_audio_input,
960
+ lora_name_or_path,
961
+ ],
962
+ outputs=outputs + [input_params_json],
963
  )
964
 
965
 
966
  def create_main_demo_ui(
967
  text2music_process_func=dump_func,
968
  sample_data_func=dump_func,
969
+ load_data_func=dump_func,
970
  ):
971
  with gr.Blocks(
972
  title="ACE-Step Model 1.0 DEMO",
 
974
  gr.Markdown(
975
  """
976
  <h1 style="text-align: center;">ACE-Step: A Step Towards Music Generation Foundation Model</h1>
977
+ """
978
+ )
 
 
 
 
 
979
  with gr.Tab("text2music"):
980
  create_text2music_ui(
981
  gr=gr,
982
  text2music_process_func=text2music_process_func,
983
  sample_data_func=sample_data_func,
984
+ load_data_func=load_data_func,
985
  )
986
  return demo
987