Make songforge clone-anywhere with PKG_ROOT and local ComfyUI.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,132 +1,99 @@
|
|||||||
# songforge — Agent 生歌手册
|
# songforge — Agent 生歌手册
|
||||||
|
|
||||||
> 远程 / channel Agent 读这份文件即可做歌。上下文不够时**重新打开本文件**,不要凭记忆改参数。
|
> 远程 / channel Agent 读这份文件即可做歌。上下文不够时**重新打开本文件**。
|
||||||
> 人类规范全文见 `../生歌规则.md`。行为冲突时以那份 + `config/default.json` 为准。
|
> 人类规范见 ComfyUI 仓内 `生歌规则.md`(若仍嵌套部署);行为冲突以 `config/default.toml` 为准。
|
||||||
|
|
||||||
## 0. 你是谁、要交什么
|
## 0. 交付物
|
||||||
|
|
||||||
你是 songforge 流水线操作员。交付物是:
|
|
||||||
|
|
||||||
1. 一次 `gen` 的 `run_id`
|
1. 一次 `gen` 的 `run_id`
|
||||||
2. ComfyUI 产出的 flac
|
2. ComfyUI 产出的 flac
|
||||||
3. `qc --baseline` 结论为 **PASS**
|
3. `qc --baseline` → **PASS**
|
||||||
|
|
||||||
`style_fam` 只是弱参考,不要把它当 PASS 条件,也不要对外说「风格已验证」。
|
`style_fam` 只是弱参考,不要当 PASS 条件。
|
||||||
|
|
||||||
## 1. 工作目录(硬)
|
## 1. 工作目录
|
||||||
|
|
||||||
```text
|
**推荐(独立仓):** 在 clone 根目录执行:
|
||||||
cd D:\CodeFiles\Thinking\ComfyUI-MiniMaxH3\user\default\workflows
|
|
||||||
|
```powershell
|
||||||
|
cd D:\CodeFiles\ProProjects\songforge # 或任意 clone 路径
|
||||||
|
.\.venv\Scripts\python.exe songforge.py <命令>
|
||||||
```
|
```
|
||||||
|
|
||||||
唯一入口:
|
**嵌套在 ComfyUI 时**也可:
|
||||||
|
|
||||||
```text
|
```powershell
|
||||||
|
cd <ComfyUI>\user\default\workflows
|
||||||
python songforge\songforge.py <命令>
|
python songforge\songforge.py <命令>
|
||||||
```
|
```
|
||||||
|
|
||||||
禁止:手写 tags / 手写前奏 / 改 workflow JSON 调参 / 换 YuE2·Music3·aio / 放宽 QC 阈值。
|
禁止:手写 tags / 手写前奏 / 改 workflow JSON 调参 / 换 YuE2·Music3·aio / 放宽 QC 阈值。
|
||||||
|
|
||||||
## 2. 强制流水线(按顺序)
|
## 2. 流水线
|
||||||
|
|
||||||
```text
|
```text
|
||||||
doctor → target → 写歌词 → check → gen → qc --baseline
|
doctor → target → 写歌词 → check → gen → qc --baseline
|
||||||
```
|
```
|
||||||
|
|
||||||
```powershell
|
- `check` 不过 → **只改歌词**
|
||||||
python songforge\songforge.py doctor
|
- `doctor` 服务不可达 → 先起 ComfyUI;检查 `config/local.toml` 的 `engine.server` / `paths.comfy_root`
|
||||||
python songforge\songforge.py target --style pop --bpm 104 --dur 180
|
- `qc` 必须带 `--baseline`
|
||||||
# 按 target 打印的放行区间写歌词(勿手写 [intro] / tags)
|
- 索引:`catalog` / `catalog --rebuild`
|
||||||
python songforge\songforge.py check --style pop --title 歌名 --lyrics-file <路径.txt> --bpm 104 --dur 180
|
|
||||||
python songforge\songforge.py gen --style pop --title 歌名 --lyrics-file <路径.txt> --bpm 104 --dur 180
|
|
||||||
python songforge\songforge.py qc --run <run_id> --baseline
|
|
||||||
```
|
|
||||||
|
|
||||||
- `check` 不过 → **只改歌词**,不准改 shift/steps/cfg/temperature
|
## 3. 硬锁定
|
||||||
- `doctor` 服务不可达 → 先起 ComfyUI(`http://127.0.0.1:8188`)
|
|
||||||
- `qc` 必须带 `--baseline`;`--run` 用 `gen-...` 或 `songforge\data\runs\<日>\gen-...` 均可
|
|
||||||
- 索引:`python songforge\songforge.py catalog` / `catalog --rebuild`
|
|
||||||
|
|
||||||
## 3. 硬锁定(不可谈判)
|
|
||||||
|
|
||||||
| 项 | 值 |
|
| 项 | 值 |
|
||||||
|----|-----|
|
|----|-----|
|
||||||
| checkpoint | `ace_step_1.5_turbo_swl_fused.safetensors` |
|
| checkpoint | `ace_step_1.5_turbo_swl_fused.safetensors` |
|
||||||
| LoRA | `swl_voice_best_ep257.safetensors`(0.5 / 0.5) |
|
| LoRA | `swl_voice_best_ep257.safetensors`(0.5 / 0.5) |
|
||||||
| 采样 | shift=5.5 / steps=28 / cfg=2.0 / temperature=0.68 |
|
| 采样 | shift=5.5 / steps=28 / cfg=2.0 / temperature=0.68 |
|
||||||
| 时长 | 完整歌 **150–200** 秒(默认跟风格字典;pop 常 180) |
|
| 时长 | 完整歌 **150–200** 秒 |
|
||||||
| 前奏 | 8 小节器乐 hook,第一拍进鼓;CLI `assemble` 自动注入 |
|
| 前奏 | 8 小节器乐 hook;CLI 自动注入 |
|
||||||
|
|
||||||
改算法参数只动 `config/default.toml`;本机路径用 `config/local.toml`(gitignore)。不要改 `data/runs/` 里的过程 JSON。
|
算法 → `config/default.toml`;本机路径 → `config/local.toml`(gitignore)。
|
||||||
|
|
||||||
配置优先级:
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
命令行 > SONGFORGE_* > local.toml > default.toml > DEFAULTS
|
命令行 > SONGFORGE_* > local.toml > default.toml > DEFAULTS
|
||||||
```
|
```
|
||||||
|
|
||||||
CLI 用项目 `.venv`;QC 用 `local.toml` 的 `qc_python`(可与 ComfyUI venv 分离)。
|
CLI = 项目 `.venv`;QC = `local.toml` 的 `qc_python`。
|
||||||
|
|
||||||
## 4. 目录地图(项目 vs 数据)
|
## 4. 目录(相对仓根)
|
||||||
|
|
||||||
路径键在 `config/default.json` → `paths`。相对 `user/default/workflows`:
|
| 级别 | 路径 |
|
||||||
|
|------|------|
|
||||||
|
| 项目 | `input/lyrics/`、`config/baseline/`、`workflows/template.json` |
|
||||||
|
| 本机 | `config/local.toml` |
|
||||||
|
| 数据 | `data/runs/YYYY-MM-DD/`、`data/tmp/`、`index/catalog.jsonl`、`cache/` |
|
||||||
|
| 外部 | `<comfy_root>/output/MyMusic/` |
|
||||||
|
|
||||||
| 级别 | 用途 | 默认路径 |
|
## 5. 写歌词
|
||||||
|------|------|----------|
|
|
||||||
| 项目 | 歌词投放 | `songforge/input/lyrics/` |
|
|
||||||
| 项目 | QC/风格基线 | `songforge/config/baseline/` |
|
|
||||||
| 项目 | 规范文档 | `生歌规则.md` / `AGENTS.md` / `docs/使用手册.md` |
|
|
||||||
| 数据 | 正式运行 | `songforge/data/runs/YYYY-MM-DD/gen-*/` |
|
|
||||||
| 数据 | 临时会话 | `songforge/data/tmp/YYYY-MM-DD/` |
|
|
||||||
| 数据 | 全局索引 | `songforge/index/catalog.jsonl` |
|
|
||||||
| 数据 | QC/风格缓存 | `songforge/cache/qc/` `cache/style/` |
|
|
||||||
| 外部 | 音频成品 | `<ComfyUI>/output/MyMusic/`(`local.json` 可改) |
|
|
||||||
|
|
||||||
本机路径写 `config/local.json`(从 `local.json.example` 复制):`comfy_root` / `qc_python` / `music_dir`。
|
1. 先 `target`,音节进放行区间。
|
||||||
|
2. 不要写 `[intro]` / tags——`assemble` 会注入。
|
||||||
## 5. 写歌词要点
|
3. 段落用 `[verse]` `[chorus]` 等。
|
||||||
|
4. 英文低音吟唱用 `--chill-vocal`。
|
||||||
1. 先 `target`,正文音节落进放行区间(偏稀 → 模型用拖腔填空)。
|
|
||||||
2. **不要**写 `[intro]` / Instrumental 前奏 / tags——`assemble` 会注入。
|
|
||||||
3. 段落用 `[verse]` `[chorus]` 等英文结构标记。
|
|
||||||
4. 默认密度档 = 人声填满;英文低音吟唱用 `--chill-vocal`(自动 sparse)。
|
|
||||||
|
|
||||||
可用素材示例(区间已合适):
|
|
||||||
|
|
||||||
```text
|
|
||||||
songforge\_archive\lyrics_corpus\拍一下.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
## 6. 失败速查
|
## 6. 失败速查
|
||||||
|
|
||||||
| 现象 | 动作 |
|
| 现象 | 动作 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| doctor FAIL 服务 | 启动 ComfyUI |
|
| doctor FAIL 服务 | 启动 ComfyUI;核对 local.toml server |
|
||||||
| check 密度失败 | 改歌词到 target 区间 |
|
| doctor FAIL 模型 | comfy_root 下是否有锁定 checkpoint/LoRA |
|
||||||
| gen 提交失败 | 跑 `selftest`;用 `--dry-run` 看 payload |
|
| check 密度失败 | 改歌词 |
|
||||||
| qc voice_nn=null | 漏了 `--baseline` |
|
| qc voice_nn=null | 漏了 `--baseline` |
|
||||||
| qc FAIL | 修歌/重 gen,**不**改阈值 |
|
| qc FAIL | 修歌/重 gen,不改阈值 |
|
||||||
| CLI 崩溃 | `--dry-run` 或 fallback 旧 `remake_v5.py`(勿删) |
|
|
||||||
|
|
||||||
怀疑 CLI 坏了:
|
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
python songforge\songforge.py selftest
|
.\.venv\Scripts\python.exe songforge.py selftest
|
||||||
```
|
```
|
||||||
|
|
||||||
## 7. 上下文不够时
|
## 7. 验收清单
|
||||||
|
|
||||||
1. 重读本文件第 1–3 节。
|
|
||||||
2. 打开 `songforge/config/default.json` 核对模型/采样/paths。
|
|
||||||
3. 打开本次 `runs/<run_id>/run.log` 与 `manifest.json`。
|
|
||||||
4. 不要发明新采样参数或新模型名。
|
|
||||||
|
|
||||||
## 8. 最小验收清单
|
|
||||||
|
|
||||||
```text
|
```text
|
||||||
[ ] doctor 全绿(模型锁定 + 采样在带内)
|
[ ] local.toml 已填 comfy_root / server
|
||||||
|
[ ] doctor 全绿
|
||||||
[ ] check OK
|
[ ] check OK
|
||||||
[ ] gen 产出 flac,时长在 150–200
|
[ ] gen 产出 flac,时长 150–200
|
||||||
[ ] qc --baseline → [PASS]
|
[ ] qc --baseline → PASS
|
||||||
[ ] 未改阈值、未换模型
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -2,61 +2,64 @@
|
|||||||
|
|
||||||
本地 ACE-Step 生歌 CLI:锁定模型与声线 LoRA、铁律前奏注入、歌词密度硬校验、QC 验收。
|
本地 ACE-Step 生歌 CLI:锁定模型与声线 LoRA、铁律前奏注入、歌词密度硬校验、QC 验收。
|
||||||
|
|
||||||
自己用爽是第一目标;代码按 MIT 开源,方便别人在 ComfyUI + ACE-Step 上复用同一套流水线。
|
**独立项目**:clone 到任意目录,写好 `config/local.toml` 指向本机 ComfyUI,即可生成。
|
||||||
|
|
||||||
| 文档 | 给谁 |
|
| 文档 | 给谁 |
|
||||||
|------|------|
|
|------|------|
|
||||||
| [`AGENTS.md`](AGENTS.md) | Agent / 自动化(做歌时重读) |
|
| [`AGENTS.md`](AGENTS.md) | Agent / 自动化 |
|
||||||
| [`docs/使用手册.md`](docs/使用手册.md) | 人类操作 |
|
| [`docs/使用手册.md`](docs/使用手册.md) | 人类操作 |
|
||||||
|
|
||||||
## 两个 Python 环境(别混)
|
## 换目录也能用(推荐)
|
||||||
|
|
||||||
| 环境 | 用途 | 怎么来 |
|
|
||||||
|------|------|--------|
|
|
||||||
| **项目 `.venv`** | CLI:`doctor` / `target` / `check` / `gen` / `catalog` | `scripts\setup_venv.ps1` |
|
|
||||||
| **`qc_python`** | QC 音频栈(librosa / torch / demucs) | `config/local.toml` 指向 ComfyUI venv,或自建重环境 |
|
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# 1) 建 CLI 环境(推荐 Python 3.13 / ≥3.11)
|
# 1) clone(GitHub 或 Gitea)
|
||||||
cd path\to\songforge
|
cd D:\CodeFiles\ProProjects
|
||||||
|
git clone https://git.nnrc.ren/swl/songforge.git
|
||||||
|
cd songforge
|
||||||
|
|
||||||
|
# 2) CLI 环境(Python >= 3.11)
|
||||||
.\scripts\setup_venv.ps1
|
.\scripts\setup_venv.ps1
|
||||||
|
|
||||||
# 2) 本机路径
|
# 3) 本机 ComfyUI 连接(只改这一份)
|
||||||
copy config\local.toml.example config\local.toml
|
copy config\local.toml.example config\local.toml
|
||||||
# 编辑 comfy_root / qc_python / music_dir
|
# 编辑:
|
||||||
|
# [engine] server = "http://127.0.0.1:8188"
|
||||||
|
# [paths] comfy_root / qc_python / music_dir
|
||||||
|
|
||||||
# 3) 工作目录:包的父目录(文件夹名必须是 songforge)
|
# 4) 先起 ComfyUI,再体检
|
||||||
cd ..
|
.\.venv\Scripts\python.exe songforge.py doctor
|
||||||
.\songforge\.venv\Scripts\python.exe songforge\songforge.py doctor
|
|
||||||
```
|
```
|
||||||
|
|
||||||
嵌套在 ComfyUI 时父目录就是 `user\default\workflows`。
|
只要 ComfyUI 在跑、`local.toml` 里 `comfy_root` 指向正确安装根(含 `models/checkpoints` 与 LoRA),**不必**把本仓放进 ComfyUI 的 `user/default/workflows`。
|
||||||
|
|
||||||
|
## 两个 Python 环境
|
||||||
|
|
||||||
|
| 环境 | 用途 |
|
||||||
|
|------|------|
|
||||||
|
| **本仓 `.venv`** | CLI:`doctor` / `check` / `gen` / `catalog` |
|
||||||
|
| **`qc_python`** | QC 音频栈(可继续用 ComfyUI 的 venv) |
|
||||||
|
|
||||||
## 配置:TOML vs JSON
|
## 配置:TOML vs JSON
|
||||||
|
|
||||||
| 文件 | 格式 | 作用 |
|
| 文件 | 作用 |
|
||||||
|------|------|------|
|
|------|------|
|
||||||
| `config/default.toml` | **TOML** | 算法 / 采样 / 相对路径(可提交) |
|
| `config/default.toml` | 算法 / 相对路径(相对**本仓根**) |
|
||||||
| `config/local.toml` | **TOML** | 本机绝对路径(gitignore) |
|
| `config/local.toml` | 本机 Comfy 根、服务地址、QC Python(gitignore) |
|
||||||
| `config/styles.json` `lexicon.json` | JSON | 风格字典 / 禁词(数据) |
|
| `workflows/template.json` | 包内 workflow 图(JSON,与配置分流) |
|
||||||
| `config/baseline/*.json` | JSON | QC 基线数值 |
|
| `config/baseline/*.json` | QC 基线数据 |
|
||||||
| `workflows/*.json` 与 Comfy 模板 | JSON | **只有** workflow 图用 JSON |
|
|
||||||
|
|
||||||
优先级:`命令行 > SONGFORGE_* > local.toml > default.toml > DEFAULTS`
|
优先级:`命令行 > SONGFORGE_* > local.toml > default.toml > DEFAULTS`
|
||||||
(仍可读旧的 `local.json` / `default.json`,同名时 TOML 覆盖。)
|
|
||||||
|
|
||||||
## 30 秒流水线
|
## 流水线
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
python songforge\songforge.py doctor
|
.\.venv\Scripts\python.exe songforge.py target --style pop --bpm 104 --dur 180
|
||||||
python songforge\songforge.py target --style pop --bpm 104 --dur 180
|
.\.venv\Scripts\python.exe songforge.py check --style pop --title 歌名 --lyrics-file input\lyrics\歌名.txt
|
||||||
python songforge\songforge.py check --style pop --title 歌名 --lyrics-file songforge\input\lyrics\歌名.txt
|
.\.venv\Scripts\python.exe songforge.py gen --style pop --title 歌名 --lyrics-file input\lyrics\歌名.txt
|
||||||
python songforge\songforge.py gen --style pop --title 歌名 --lyrics-file songforge\input\lyrics\歌名.txt
|
.\.venv\Scripts\python.exe songforge.py qc --run gen-<时间戳> --baseline
|
||||||
python songforge\songforge.py qc --run gen-<时间戳> --baseline
|
|
||||||
python songforge\songforge.py catalog --limit 20
|
|
||||||
```
|
```
|
||||||
|
|
||||||
`qc` 必须带 `--baseline`。
|
`qc` 必须带 `--baseline`。音频写到 ComfyUI `output/MyMusic/`(可用 `music_dir` 覆盖)。
|
||||||
|
|
||||||
## 硬约束(摘要)
|
## 硬约束(摘要)
|
||||||
|
|
||||||
@@ -67,29 +70,21 @@ python songforge\songforge.py catalog --limit 20
|
|||||||
| 时长 | 完整歌 150–200 秒 |
|
| 时长 | 完整歌 150–200 秒 |
|
||||||
| 前奏 | 8 小节器乐 hook;CLI 自动注入 |
|
| 前奏 | 8 小节器乐 hook;CLI 自动注入 |
|
||||||
|
|
||||||
## 目录(项目 vs 数据)
|
## 目录
|
||||||
|
|
||||||
```
|
```
|
||||||
songforge/ # Git 仓根 = 包根
|
songforge/ # clone 下来的仓根 = 包根
|
||||||
config/default.toml # 算法配置
|
config/default.toml
|
||||||
config/local.toml # 本机(勿提交)
|
config/local.toml # 本机(勿提交)
|
||||||
config/baseline/ # QC 基线
|
|
||||||
cli/ core/ rules/ ...
|
|
||||||
data/runs/YYYY-MM-DD/ # gen 产物
|
data/runs/YYYY-MM-DD/ # gen 产物
|
||||||
data/tmp/YYYY-MM-DD/ # doctor/check
|
workflows/template.json
|
||||||
index/catalog.jsonl
|
.venv/
|
||||||
workflows/template.json # 包内备用模板
|
|
||||||
.venv/ # CLI 专用(勿提交)
|
|
||||||
.secrets/ # 本地 token(勿提交)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
音频成品仍在 ComfyUI `output/MyMusic/`(可用 `music_dir` 覆盖)。
|
## 远程
|
||||||
|
|
||||||
## Git
|
- GitHub: https://github.com/lsuen/songforge
|
||||||
|
- Gitea: https://git.nnrc.ren/swl/songforge
|
||||||
- `main`:项目资产
|
|
||||||
- `archive/full-snapshot`:本地过程数据备份,**不要 push**
|
|
||||||
- `.secrets/`、`config/local.toml`、`.venv/`、`data/**` 均已 ignore
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
+9
-5
@@ -27,8 +27,10 @@ def cmd_doctor(args):
|
|||||||
root = layout["comfy_root"]
|
root = layout["comfy_root"]
|
||||||
log.info("doctor 开始", server=cfg["engine"]["server"])
|
log.info("doctor 开始", server=cfg["engine"]["server"])
|
||||||
print("== 路径 ==")
|
print("== 路径 ==")
|
||||||
|
print(" 仓根 PKG %s" % layout["pkg"])
|
||||||
print(" ComfyUI 根 %s" % root)
|
print(" ComfyUI 根 %s" % root)
|
||||||
print(" workflows %s" % ROOT)
|
print(" Comfy 服务 %s" % cfg["engine"]["server"])
|
||||||
|
print(" 模板 %s" % layout["template"])
|
||||||
print(" runs %s (按日 YYYY-MM-DD/)" % layout["runs"])
|
print(" runs %s (按日 YYYY-MM-DD/)" % layout["runs"])
|
||||||
print(" tmp %s" % layout["tmp"])
|
print(" tmp %s" % layout["tmp"])
|
||||||
print(" lyrics %s" % layout["lyrics"])
|
print(" lyrics %s" % layout["lyrics"])
|
||||||
@@ -36,8 +38,8 @@ def cmd_doctor(args):
|
|||||||
print(" catalog %s" % layout["catalog"])
|
print(" catalog %s" % layout["catalog"])
|
||||||
print(" qc_cache %s" % layout["qc_cache"])
|
print(" qc_cache %s" % layout["qc_cache"])
|
||||||
print(" 音频输出 %s" % layout["audio_out"])
|
print(" 音频输出 %s" % layout["audio_out"])
|
||||||
local_toml = os.path.join(ROOT, "songforge", "config", "local.toml")
|
local_toml = os.path.join(pmod.PKG_ROOT, "config", "local.toml")
|
||||||
local_json = os.path.join(ROOT, "songforge", "config", "local.json")
|
local_json = os.path.join(pmod.PKG_ROOT, "config", "local.json")
|
||||||
if os.path.isfile(local_toml):
|
if os.path.isfile(local_toml):
|
||||||
print(" local.toml 有")
|
print(" local.toml 有")
|
||||||
elif os.path.isfile(local_json):
|
elif os.path.isfile(local_json):
|
||||||
@@ -45,6 +47,8 @@ def cmd_doctor(args):
|
|||||||
else:
|
else:
|
||||||
print(" local.toml 无(复制 config/local.toml.example)")
|
print(" local.toml 无(复制 config/local.toml.example)")
|
||||||
print(" CLI python %s" % loader.python_hint())
|
print(" CLI python %s" % loader.python_hint())
|
||||||
|
qc_py = (cfg.get("paths") or {}).get("qc_python")
|
||||||
|
print(" QC python %s" % (qc_py or "(未配置,qc 时自动探测)"))
|
||||||
|
|
||||||
print("== 根目录卫生 ==")
|
print("== 根目录卫生 ==")
|
||||||
pkg = layout["pkg"]
|
pkg = layout["pkg"]
|
||||||
@@ -77,7 +81,7 @@ def cmd_doctor(args):
|
|||||||
print("== 模型 ==")
|
print("== 模型 ==")
|
||||||
ck = pmod.model_path(root, "checkpoints", cfg["model"]["checkpoint"])
|
ck = pmod.model_path(root, "checkpoints", cfg["model"]["checkpoint"])
|
||||||
lora = pmod.model_path(root, "loras", cfg["model"]["lora"])
|
lora = pmod.model_path(root, "loras", cfg["model"]["lora"])
|
||||||
tpl = os.path.join(ROOT, cfg["paths"]["workflow_template"])
|
tpl = layout["template"]
|
||||||
rc = 0
|
rc = 0
|
||||||
for label, p in (("checkpoint", ck), ("lora", lora),
|
for label, p in (("checkpoint", ck), ("lora", lora),
|
||||||
("template", tpl)):
|
("template", tpl)):
|
||||||
@@ -271,7 +275,7 @@ def cmd_gen(args):
|
|||||||
cap_ratio=round(stats["fill"], 3),
|
cap_ratio=round(stats["fill"], 3),
|
||||||
instrumental=inst, density_profile=prof or "default")
|
instrumental=inst, density_profile=prof or "default")
|
||||||
|
|
||||||
template = wfmod.load_template(cfg["paths"]["workflow_template"])
|
template = wfmod.load_template(cfg["paths"]["workflow_template"], cfg=cfg)
|
||||||
prefix = cfg["paths"]["output_prefix"]
|
prefix = cfg["paths"]["output_prefix"]
|
||||||
fmt = cfg["paths"]["output_format"]
|
fmt = cfg["paths"]["output_format"]
|
||||||
seed_base = args.seed if args.seed else random.randint(1, 2 ** 31 - 1)
|
seed_base = args.seed if args.seed else random.randint(1, 2 ** 31 - 1)
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ from ..core import workflow as wfmod
|
|||||||
from ..core.errors import ConfigError
|
from ..core.errors import ConfigError
|
||||||
from ..log.logger import Logger, Run
|
from ..log.logger import Logger, Run
|
||||||
|
|
||||||
ROOT = wfmod.ROOT
|
ROOT = pmod.PKG_ROOT
|
||||||
|
|
||||||
# chill 吟唱(第三张专辑)的前奏小节数。
|
# chill 吟唱(第三张专辑)的前奏小节数。
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ from ..config import loader
|
|||||||
from ..core import catalog as catmod
|
from ..core import catalog as catmod
|
||||||
from ..core import paths as pmod
|
from ..core import paths as pmod
|
||||||
|
|
||||||
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
ROOT = pmod.PKG_ROOT
|
||||||
WORKER = os.path.join(ROOT, "songforge", "tools", "qc_worker.py")
|
WORKER = os.path.join(ROOT, "tools", "qc_worker.py")
|
||||||
|
|
||||||
|
|
||||||
def _cfg():
|
def _cfg():
|
||||||
@@ -112,11 +112,13 @@ def _read_manifest(run_id):
|
|||||||
runs = pmod.under_workflows(cfg["paths"]["runs_dir"])
|
runs = pmod.under_workflows(cfg["paths"]["runs_dir"])
|
||||||
rundir = catmod.find_run_dir(runs, rid)
|
rundir = catmod.find_run_dir(runs, rid)
|
||||||
if not rundir:
|
if not rundir:
|
||||||
# 兼容旧路径 songforge/runs/<id>
|
# 兼容旧扁平 runs/
|
||||||
legacy = os.path.join(ROOT, "songforge", "runs", rid, "manifest.json")
|
for legacy_root in (os.path.join(ROOT, "runs", rid),
|
||||||
if os.path.isfile(legacy):
|
os.path.join(ROOT, "data", "runs", rid)):
|
||||||
with open(legacy, encoding="utf-8") as f:
|
legacy = os.path.join(legacy_root, "manifest.json")
|
||||||
return json.load(f), os.path.dirname(legacy)
|
if os.path.isfile(legacy):
|
||||||
|
with open(legacy, encoding="utf-8") as f:
|
||||||
|
return json.load(f), os.path.dirname(legacy)
|
||||||
return None, None
|
return None, None
|
||||||
with open(os.path.join(rundir, "manifest.json"), encoding="utf-8") as f:
|
with open(os.path.join(rundir, "manifest.json"), encoding="utf-8") as f:
|
||||||
return json.load(f), rundir
|
return json.load(f), rundir
|
||||||
|
|||||||
+24
-18
@@ -16,7 +16,7 @@ from .common import ROOT, now_id
|
|||||||
# 素材库迁到 _archive/lyrics_corpus 后,selftest 仍读包内 probe。
|
# 素材库迁到 _archive/lyrics_corpus 后,selftest 仍读包内 probe。
|
||||||
# 旧文件名 02_InstLowChill.txt 已不在树里,以现有 03 为准。
|
# 旧文件名 02_InstLowChill.txt 已不在树里,以现有 03 为准。
|
||||||
_CHILL_DEMO = os.path.join(
|
_CHILL_DEMO = os.path.join(
|
||||||
ROOT, "songforge", "lyrics", "probe", "03_InstLowChill6.txt")
|
ROOT, "lyrics", "probe", "03_InstLowChill6.txt")
|
||||||
|
|
||||||
|
|
||||||
def _t_runid():
|
def _t_runid():
|
||||||
@@ -79,13 +79,16 @@ def _t_path_layout():
|
|||||||
layout = pmod.path_layout(cfg)
|
layout = pmod.path_layout(cfg)
|
||||||
runs_n = layout["runs"].replace("\\", "/")
|
runs_n = layout["runs"].replace("\\", "/")
|
||||||
tmp_n = layout["tmp"].replace("\\", "/")
|
tmp_n = layout["tmp"].replace("\\", "/")
|
||||||
assert runs_n.endswith("songforge/data/runs"), "runs 路径异常: %s" % runs_n
|
assert runs_n.replace("\\", "/").endswith("/data/runs") or \
|
||||||
assert tmp_n.endswith("songforge/data/tmp"), "tmp 路径异常: %s" % tmp_n
|
runs_n.endswith("data/runs"), "runs 路径异常: %s" % runs_n
|
||||||
|
assert tmp_n.replace("\\", "/").endswith("/data/tmp") or \
|
||||||
|
tmp_n.endswith("data/tmp"), "tmp 路径异常: %s" % tmp_n
|
||||||
assert os.path.isdir(layout["baseline"]), "baseline 目录缺失: %s" % layout["baseline"]
|
assert os.path.isdir(layout["baseline"]), "baseline 目录缺失: %s" % layout["baseline"]
|
||||||
|
assert os.path.isfile(layout["template"]), "模板缺失: %s" % layout["template"]
|
||||||
for name in ("qc_baseline.json", "qc_baseline_old.json", "style_ref.json"):
|
for name in ("qc_baseline.json", "qc_baseline_old.json", "style_ref.json"):
|
||||||
assert os.path.isfile(os.path.join(layout["baseline"], name)), \
|
assert os.path.isfile(os.path.join(layout["baseline"], name)), \
|
||||||
"缺少基线文件 %s" % name
|
"缺少基线文件 %s" % name
|
||||||
return [("目录布局", "data/runs|tmp + baseline + catalog 已从 config.paths 解析")]
|
return [("目录布局", "仓根 data/ + baseline + 包内模板 已解析")]
|
||||||
|
|
||||||
|
|
||||||
def _t_paths():
|
def _t_paths():
|
||||||
@@ -648,7 +651,7 @@ def _t_parity():
|
|||||||
oapi = old.convert(owf)
|
oapi = old.convert(owf)
|
||||||
|
|
||||||
cfg = loader.load({})
|
cfg = loader.load({})
|
||||||
template = wfmod.load_template(cfg["paths"]["workflow_template"])
|
template = wfmod.load_template(cfg["paths"]["workflow_template"], cfg=cfg)
|
||||||
m = [x for x in old.META if x[0] == title][0]
|
m = [x for x in old.META if x[0] == title][0]
|
||||||
_, oseed, obpm, okey, odur, oinst = m
|
_, oseed, obpm, okey, odur, oinst = m
|
||||||
nwf = wfmod.build_workflow(
|
nwf = wfmod.build_workflow(
|
||||||
@@ -686,22 +689,25 @@ def _t_parity():
|
|||||||
|
|
||||||
|
|
||||||
def _t_fallback():
|
def _t_fallback():
|
||||||
"""fallback 资产必须仍在原位。"""
|
"""包内模板 + Comfy 输出目录必须可用;旧 workflows 旁路资产可选。"""
|
||||||
root = pmod.comfy_root()
|
root = pmod.comfy_root()
|
||||||
need = [
|
bundled = os.path.join(pmod.PKG_ROOT, "workflows", "template.json")
|
||||||
os.path.join(ROOT, "song_rules.py"),
|
music = pmod.output_dir(root, "MyMusic")
|
||||||
os.path.join(ROOT, "urbanhiphop-身体先听懂.json"),
|
if not os.path.isfile(bundled):
|
||||||
pmod.output_dir(root, "MyMusic"),
|
return [("fallback 资产", "FAIL 缺包内模板 %s" % bundled)]
|
||||||
|
if not os.path.isdir(music):
|
||||||
|
os.makedirs(music, exist_ok=True)
|
||||||
|
host = pmod.comfy_workflows_dir()
|
||||||
|
legacy = [
|
||||||
|
os.path.join(host, "song_rules.py"),
|
||||||
|
os.path.join(host, "urbanhiphop-身体先听懂.json"),
|
||||||
]
|
]
|
||||||
missing = [p for p in need if not os.path.exists(p)]
|
legacy_ok = sum(1 for p in legacy if os.path.isfile(p))
|
||||||
bak_root = os.path.join(ROOT, "bak")
|
bak_root = os.path.join(host, "bak")
|
||||||
stamps = sorted(os.listdir(bak_root)) if os.path.isdir(bak_root) else []
|
stamps = sorted(os.listdir(bak_root)) if os.path.isdir(bak_root) else []
|
||||||
if missing:
|
return [("fallback 资产",
|
||||||
return [("fallback 资产", "FAIL 缺失 %s" % missing)]
|
"包内模板 + MyMusic 就位;Comfy workflows 旧资产 %d/2,bak %d 份"
|
||||||
if not stamps:
|
% (legacy_ok, len(stamps)))]
|
||||||
return [("fallback 资产", "FAIL bak 目录为空")]
|
|
||||||
return [("fallback 资产", "song_rules.py / 模板 / output/MyMusic 就位,bak %d 份"
|
|
||||||
% len(stamps))]
|
|
||||||
|
|
||||||
|
|
||||||
def _t_window():
|
def _t_window():
|
||||||
|
|||||||
+11
-11
@@ -36,18 +36,18 @@ min_p = 0.02
|
|||||||
generate_audio_codes = true
|
generate_audio_codes = true
|
||||||
timesignature = "4"
|
timesignature = "4"
|
||||||
|
|
||||||
# 相对路径相对「workflows 父目录」(嵌套在 ComfyUI 时)或克隆仓的父目录。
|
# 相对路径一律相对本仓根(clone 到哪就是哪)。
|
||||||
# 本机 comfy_root / qc_python / music_dir 放 local.toml。
|
# 本机 comfy_root / qc_python / music_dir / server 放 local.toml。
|
||||||
[paths]
|
[paths]
|
||||||
workflow_template = "urbanhiphop-身体先听懂.json"
|
workflow_template = "workflows/template.json"
|
||||||
runs_dir = "songforge/data/runs"
|
runs_dir = "data/runs"
|
||||||
tmp_dir = "songforge/data/tmp"
|
tmp_dir = "data/tmp"
|
||||||
lyrics_dir = "songforge/input/lyrics"
|
lyrics_dir = "input/lyrics"
|
||||||
qc_cache_dir = "songforge/cache/qc"
|
qc_cache_dir = "cache/qc"
|
||||||
style_cache_dir = "songforge/cache/style"
|
style_cache_dir = "cache/style"
|
||||||
index_dir = "songforge/index"
|
index_dir = "index"
|
||||||
catalog_file = "songforge/index/catalog.jsonl"
|
catalog_file = "index/catalog.jsonl"
|
||||||
baseline_dir = "songforge/config/baseline"
|
baseline_dir = "config/baseline"
|
||||||
output_prefix = "MyMusic"
|
output_prefix = "MyMusic"
|
||||||
output_format = "flac"
|
output_format = "flac"
|
||||||
|
|
||||||
|
|||||||
+13
-11
@@ -17,8 +17,10 @@ try:
|
|||||||
except ModuleNotFoundError: # Python < 3.11
|
except ModuleNotFoundError: # Python < 3.11
|
||||||
import tomli as tomllib # type: ignore
|
import tomli as tomllib # type: ignore
|
||||||
|
|
||||||
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
# config/loader.py -> 仓根
|
||||||
CONFIG_DIR = os.path.join(ROOT, "songforge", "config")
|
PKG_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
ROOT = PKG_ROOT
|
||||||
|
CONFIG_DIR = os.path.join(PKG_ROOT, "config")
|
||||||
|
|
||||||
DEFAULTS = {
|
DEFAULTS = {
|
||||||
"engine": {"server": "http://127.0.0.1:8188", "timeout_sec": 3600,
|
"engine": {"server": "http://127.0.0.1:8188", "timeout_sec": 3600,
|
||||||
@@ -33,15 +35,15 @@ DEFAULTS = {
|
|||||||
"encode": {"cfg_scale": 3.0, "temperature": 0.68, "top_p": 0.88,
|
"encode": {"cfg_scale": 3.0, "temperature": 0.68, "top_p": 0.88,
|
||||||
"top_k": 50, "min_p": 0.02, "generate_audio_codes": True,
|
"top_k": 50, "min_p": 0.02, "generate_audio_codes": True,
|
||||||
"timesignature": "4"},
|
"timesignature": "4"},
|
||||||
"paths": {"workflow_template": "urbanhiphop-身体先听懂.json",
|
"paths": {"workflow_template": "workflows/template.json",
|
||||||
"runs_dir": "songforge/data/runs",
|
"runs_dir": "data/runs",
|
||||||
"tmp_dir": "songforge/data/tmp",
|
"tmp_dir": "data/tmp",
|
||||||
"lyrics_dir": "songforge/input/lyrics",
|
"lyrics_dir": "input/lyrics",
|
||||||
"qc_cache_dir": "songforge/cache/qc",
|
"qc_cache_dir": "cache/qc",
|
||||||
"style_cache_dir": "songforge/cache/style",
|
"style_cache_dir": "cache/style",
|
||||||
"index_dir": "songforge/index",
|
"index_dir": "index",
|
||||||
"catalog_file": "songforge/index/catalog.jsonl",
|
"catalog_file": "index/catalog.jsonl",
|
||||||
"baseline_dir": "songforge/config/baseline",
|
"baseline_dir": "config/baseline",
|
||||||
"comfy_root": None,
|
"comfy_root": None,
|
||||||
"qc_python": None,
|
"qc_python": None,
|
||||||
"music_dir": None,
|
"music_dir": None,
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
# 复制为 local.toml(已 gitignore)。只放本机绝对路径,勿提交。
|
# 复制为 local.toml(已 gitignore)。clone 到任意目录后只改这里即可连本机 ComfyUI。
|
||||||
# CLI 用项目 .venv;QC 音频栈可继续指向 ComfyUI 专用 venv。
|
#
|
||||||
|
# 例:D:\CodeFiles\ProProjects\songforge
|
||||||
[paths]
|
# copy config\local.toml.example config\local.toml
|
||||||
comfy_root = "D:/CodeFiles/Thinking/ComfyUI-MiniMaxH3"
|
# 填好下方路径 → .\.venv\Scripts\python.exe songforge.py doctor
|
||||||
qc_python = "C:/comfyui-venv/Scripts/python.exe"
|
|
||||||
music_dir = "D:/CodeFiles/Thinking/ComfyUI-MiniMaxH3/output/MyMusic"
|
|
||||||
|
|
||||||
[engine]
|
[engine]
|
||||||
|
# ComfyUI 已启动的地址(本机默认 8188)
|
||||||
server = "http://127.0.0.1:8188"
|
server = "http://127.0.0.1:8188"
|
||||||
|
|
||||||
|
[paths]
|
||||||
|
# ComfyUI 安装根(含 models/ checkpoints、loras、custom_nodes)
|
||||||
|
comfy_root = "D:/CodeFiles/Thinking/ComfyUI-MiniMaxH3"
|
||||||
|
|
||||||
|
# QC 用的 Python(需 librosa/torch/demucs;可与 CLI .venv 分离)
|
||||||
|
qc_python = "C:/comfyui-venv/Scripts/python.exe"
|
||||||
|
|
||||||
|
# 生成音频输出目录(不填则用 <comfy_root>/output/MyMusic)
|
||||||
|
music_dir = "D:/CodeFiles/Thinking/ComfyUI-MiniMaxH3/output/MyMusic"
|
||||||
|
|||||||
+2
-2
@@ -8,8 +8,8 @@ from . import paths as pmod
|
|||||||
|
|
||||||
|
|
||||||
def catalog_path(cfg):
|
def catalog_path(cfg):
|
||||||
p = cfg["paths"].get("catalog_file") or "songforge/index/catalog.jsonl"
|
p = cfg["paths"].get("catalog_file") or "index/catalog.jsonl"
|
||||||
return pmod.under_workflows(p)
|
return pmod.under_pkg(p)
|
||||||
|
|
||||||
|
|
||||||
def day_dir(runs_root, day=None):
|
def day_dir(runs_root, day=None):
|
||||||
|
|||||||
+84
-22
@@ -1,9 +1,16 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""路径解析。ComfyUI 根优先配置/环境变量,再自动探测。"""
|
"""路径解析。
|
||||||
|
|
||||||
|
PKG_ROOT = 本仓根(clone 到哪就是哪)。
|
||||||
|
ComfyUI 根 / QC Python / 音乐目录来自 local.toml 或环境变量,与仓位置解耦。
|
||||||
|
"""
|
||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
|
|
||||||
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
# songforge/core/paths.py -> 仓根
|
||||||
|
PKG_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
# 兼容旧名:曾表示 workflows 父目录;现一律指仓根
|
||||||
|
ROOT = PKG_ROOT
|
||||||
|
|
||||||
_MARKERS = (
|
_MARKERS = (
|
||||||
os.path.join("models", "checkpoints"),
|
os.path.join("models", "checkpoints"),
|
||||||
@@ -26,8 +33,9 @@ def comfy_root(explicit=None, cfg=None):
|
|||||||
if env:
|
if env:
|
||||||
return os.path.abspath(env)
|
return os.path.abspath(env)
|
||||||
|
|
||||||
cur = ROOT
|
# 嵌套在 ComfyUI/user/default/workflows/songforge 时向上探测
|
||||||
for _ in range(6):
|
cur = PKG_ROOT
|
||||||
|
for _ in range(8):
|
||||||
hits = sum(1 for m in _MARKERS if os.path.isdir(os.path.join(cur, m)))
|
hits = sum(1 for m in _MARKERS if os.path.isdir(os.path.join(cur, m)))
|
||||||
if hits >= 2:
|
if hits >= 2:
|
||||||
return cur
|
return cur
|
||||||
@@ -36,7 +44,12 @@ def comfy_root(explicit=None, cfg=None):
|
|||||||
break
|
break
|
||||||
cur = parent
|
cur = parent
|
||||||
|
|
||||||
return os.path.dirname(os.path.dirname(os.path.dirname(ROOT)))
|
return PKG_ROOT
|
||||||
|
|
||||||
|
|
||||||
|
def comfy_workflows_dir(cfg=None):
|
||||||
|
"""ComfyUI user/default/workflows(模板搜索备用)。"""
|
||||||
|
return os.path.join(comfy_root(cfg=cfg), "user", "default", "workflows")
|
||||||
|
|
||||||
|
|
||||||
def model_path(root, *parts):
|
def model_path(root, *parts):
|
||||||
@@ -63,15 +76,29 @@ def music_dir(cfg=None, root=None):
|
|||||||
return output_dir(root, "MyMusic")
|
return output_dir(root, "MyMusic")
|
||||||
|
|
||||||
|
|
||||||
def under_workflows(rel, root=None):
|
def _strip_legacy_prefix(rel):
|
||||||
|
"""旧配置相对 workflows 父目录写 songforge/...,现相对仓根。"""
|
||||||
|
norm = rel.replace("\\", "/")
|
||||||
|
if norm.startswith("songforge/"):
|
||||||
|
return norm[len("songforge/"):]
|
||||||
|
return rel
|
||||||
|
|
||||||
|
|
||||||
|
def under_pkg(rel, root=None):
|
||||||
|
"""相对仓根解析;绝对路径原样返回。兼容旧 songforge/ 前缀。"""
|
||||||
if not rel:
|
if not rel:
|
||||||
raise ValueError("路径为空")
|
raise ValueError("路径为空")
|
||||||
if os.path.isabs(rel):
|
if os.path.isabs(rel):
|
||||||
return os.path.normpath(rel)
|
return os.path.normpath(rel)
|
||||||
base = root if root is not None else ROOT
|
rel = _strip_legacy_prefix(rel)
|
||||||
|
base = root if root is not None else PKG_ROOT
|
||||||
return os.path.normpath(os.path.join(base, rel))
|
return os.path.normpath(os.path.join(base, rel))
|
||||||
|
|
||||||
|
|
||||||
|
# 旧名
|
||||||
|
under_workflows = under_pkg
|
||||||
|
|
||||||
|
|
||||||
def ensure_dir(path):
|
def ensure_dir(path):
|
||||||
os.makedirs(path, exist_ok=True)
|
os.makedirs(path, exist_ok=True)
|
||||||
return path
|
return path
|
||||||
@@ -88,32 +115,67 @@ def day_subdir(base, day=None):
|
|||||||
|
|
||||||
def tmp_today(cfg, day=None):
|
def tmp_today(cfg, day=None):
|
||||||
"""paths.tmp_dir/YYYY-MM-DD/,确保存在。"""
|
"""paths.tmp_dir/YYYY-MM-DD/,确保存在。"""
|
||||||
base = under_workflows(cfg["paths"]["tmp_dir"])
|
base = under_pkg(cfg["paths"]["tmp_dir"])
|
||||||
return ensure_dir(day_subdir(base, day))
|
return ensure_dir(day_subdir(base, day))
|
||||||
|
|
||||||
|
|
||||||
|
def resolve_template(name_or_path, cfg=None):
|
||||||
|
"""解析 workflow 模板绝对路径。
|
||||||
|
|
||||||
|
顺序:绝对路径 → 仓内相对路径 → ComfyUI workflows 目录下的同名文件。
|
||||||
|
"""
|
||||||
|
if not name_or_path:
|
||||||
|
raise ValueError("workflow_template 为空")
|
||||||
|
if os.path.isabs(name_or_path) and os.path.isfile(name_or_path):
|
||||||
|
return name_or_path
|
||||||
|
cand = under_pkg(name_or_path)
|
||||||
|
if os.path.isfile(cand):
|
||||||
|
return cand
|
||||||
|
# 包内默认模板
|
||||||
|
bundled = os.path.join(PKG_ROOT, "workflows", "template.json")
|
||||||
|
base = os.path.basename(name_or_path)
|
||||||
|
if base in ("template.json",) and os.path.isfile(bundled):
|
||||||
|
return bundled
|
||||||
|
if name_or_path in ("workflows/template.json", "template.json") and \
|
||||||
|
os.path.isfile(bundled):
|
||||||
|
return bundled
|
||||||
|
# ComfyUI 工作流目录(嵌套部署或本机另放的模板)
|
||||||
|
cw = comfy_workflows_dir(cfg)
|
||||||
|
for p in (os.path.join(cw, name_or_path), os.path.join(cw, base),
|
||||||
|
os.path.join(cw, "songforge", "workflows", base)):
|
||||||
|
if os.path.isfile(p):
|
||||||
|
return p
|
||||||
|
if os.path.isfile(bundled):
|
||||||
|
return bundled
|
||||||
|
return cand
|
||||||
|
|
||||||
|
|
||||||
def path_layout(cfg):
|
def path_layout(cfg):
|
||||||
"""从配置展开本包目录布局(绝对路径)。"""
|
"""从配置展开本包目录布局(绝对路径)。"""
|
||||||
p = cfg["paths"]
|
p = cfg["paths"]
|
||||||
cro = comfy_root(cfg=cfg)
|
cro = comfy_root(cfg=cfg)
|
||||||
return {
|
return {
|
||||||
"workflows": ROOT,
|
"pkg": PKG_ROOT,
|
||||||
|
"workflows_host": comfy_workflows_dir(cfg),
|
||||||
"comfy_root": cro,
|
"comfy_root": cro,
|
||||||
"runs": under_workflows(p["runs_dir"]),
|
"template": resolve_template(
|
||||||
"tmp": under_workflows(p["tmp_dir"]),
|
p.get("workflow_template") or "workflows/template.json", cfg),
|
||||||
"tmp_today": day_subdir(under_workflows(p["tmp_dir"])),
|
"runs": under_pkg(p["runs_dir"]),
|
||||||
"lyrics": under_workflows(p["lyrics_dir"]),
|
"tmp": under_pkg(p["tmp_dir"]),
|
||||||
"qc_cache": under_workflows(p["qc_cache_dir"]),
|
"tmp_today": day_subdir(under_pkg(p["tmp_dir"])),
|
||||||
"style_cache": under_workflows(p["style_cache_dir"]),
|
"lyrics": under_pkg(p["lyrics_dir"]),
|
||||||
"index": under_workflows(p.get("index_dir") or "songforge/index"),
|
"qc_cache": under_pkg(p["qc_cache_dir"]),
|
||||||
"catalog": under_workflows(
|
"style_cache": under_pkg(p["style_cache_dir"]),
|
||||||
p.get("catalog_file") or "songforge/index/catalog.jsonl"),
|
"index": under_pkg(p.get("index_dir") or "index"),
|
||||||
"baseline": under_workflows(
|
"catalog": under_pkg(
|
||||||
p.get("baseline_dir") or "songforge/config/baseline"),
|
p.get("catalog_file") or "index/catalog.jsonl"),
|
||||||
|
"baseline": under_pkg(
|
||||||
|
p.get("baseline_dir") or "config/baseline"),
|
||||||
"audio_out": music_dir(cfg, cro),
|
"audio_out": music_dir(cfg, cro),
|
||||||
"pkg": under_workflows("songforge"),
|
# 兼容旧键
|
||||||
|
"workflows": PKG_ROOT,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# 根目录不应出现的过程文件(doctor WARN)
|
# 仓根不应出现的过程文件(doctor WARN)
|
||||||
ROOT_JUNK_NAMES = ("qc.json", "run.log", "manifest.json")
|
ROOT_JUNK_NAMES = ("qc.json", "run.log", "manifest.json")
|
||||||
|
|||||||
+9
-8
@@ -7,8 +7,9 @@ import os
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
from .errors import ConfigError
|
from .errors import ConfigError
|
||||||
|
from . import paths as pmod
|
||||||
|
|
||||||
ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
ROOT = pmod.PKG_ROOT
|
||||||
|
|
||||||
# UI widgets_values 顺序 -> API inputs 键名。按节点类型分别声明,避免混用。
|
# UI widgets_values 顺序 -> API inputs 键名。按节点类型分别声明,避免混用。
|
||||||
WIDGET_MAP = {
|
WIDGET_MAP = {
|
||||||
@@ -29,13 +30,13 @@ WIDGET_MAP = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def load_template(path_or_name):
|
def load_template(path_or_name, cfg=None):
|
||||||
"""path_or_name 可以是 workflows 下的文件名,也可以是绝对路径。"""
|
"""path_or_name:仓内相对路径 / Comfy workflows 文件名 / 绝对路径。"""
|
||||||
p = path_or_name
|
p = pmod.resolve_template(path_or_name, cfg=cfg)
|
||||||
if not os.path.isabs(p):
|
if not os.path.isfile(p):
|
||||||
p = os.path.join(ROOT, p)
|
raise ConfigError(
|
||||||
if not os.path.exists(p):
|
"workflow 模板不存在: %s(已试仓内 workflows/ 与 ComfyUI workflows)"
|
||||||
raise ConfigError("workflow 模板不存在: %s" % p)
|
% path_or_name)
|
||||||
with open(p, encoding="utf-8") as f:
|
with open(p, encoding="utf-8") as f:
|
||||||
return json.load(f)
|
return json.load(f)
|
||||||
|
|
||||||
|
|||||||
+9
-7
@@ -2,19 +2,21 @@
|
|||||||
|
|
||||||
本手册讲「怎么跑」。参数铁律、踩坑与版本史见上级目录 [`生歌规则.md`](../../生歌规则.md)(唯一规范)。
|
本手册讲「怎么跑」。参数铁律、踩坑与版本史见上级目录 [`生歌规则.md`](../../生歌规则.md)(唯一规范)。
|
||||||
|
|
||||||
工作目录始终:
|
推荐:clone 到任意目录后在**仓根**执行(先配 `config/local.toml`):
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
cd D:\CodeFiles\ProProjects\songforge
|
||||||
|
.\.venv\Scripts\python.exe songforge.py <命令> [选项]
|
||||||
|
```
|
||||||
|
|
||||||
|
仍嵌套在 ComfyUI 时:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
cd D:\CodeFiles\Thinking\ComfyUI-MiniMaxH3\user\default\workflows
|
cd D:\CodeFiles\Thinking\ComfyUI-MiniMaxH3\user\default\workflows
|
||||||
```
|
|
||||||
|
|
||||||
入口:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
python songforge\songforge.py <命令> [选项]
|
python songforge\songforge.py <命令> [选项]
|
||||||
```
|
```
|
||||||
|
|
||||||
音频栈(librosa/torch 等)在 `C:\comfyui-venv\Scripts\python.exe`;主 CLI 用系统 Python,`qc` 会自动起子进程调用 venv。
|
`local.toml` 填 `engine.server` + `paths.comfy_root` 即可连本机 ComfyUI。QC 音频栈用 `paths.qc_python`(常为 ComfyUI venv)。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
+14
-5
@@ -1,15 +1,24 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""songforge CLI 入口(被 ComfyUI 升级清空后重建)。
|
"""songforge CLI 入口。
|
||||||
|
|
||||||
python songforge\songforge.py doctor
|
任意目录 clone 后:
|
||||||
python songforge\songforge.py gen --style pop --title 夜班 --lyrics-file a.txt
|
|
||||||
|
cd D:\\CodeFiles\\ProProjects\\songforge
|
||||||
|
copy config\\local.toml.example config\\local.toml # 填 comfy_root / server
|
||||||
|
.\\.venv\\Scripts\\python.exe songforge.py doctor
|
||||||
|
|
||||||
|
也可在父目录执行:python songforge\\songforge.py ...
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
_HERE = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
_PARENT = os.path.dirname(_HERE)
|
||||||
|
# 包名 = 文件夹名:把父目录加入 path,使 `import songforge` 指向本仓
|
||||||
|
if _PARENT not in sys.path:
|
||||||
|
sys.path.insert(0, _PARENT)
|
||||||
|
|
||||||
from songforge.cli.main import main # noqa: E402
|
from songforge.cli.main import main # noqa: E402
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
|
|||||||
+454
-210
@@ -1,220 +1,464 @@
|
|||||||
{
|
{
|
||||||
"id": "songforge-template-2026-10-09",
|
"id": "urban-001",
|
||||||
"revision": 6,
|
"revision": 0,
|
||||||
"last_node_id": 11,
|
"last_node_id": 9,
|
||||||
"last_link_id": 30,
|
"nodes": [
|
||||||
"nodes": [
|
{
|
||||||
|
"id": 1,
|
||||||
|
"type": "CheckpointLoaderSimple",
|
||||||
|
"pos": [
|
||||||
|
40,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
360,
|
||||||
|
102
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 0,
|
||||||
|
"mode": 0,
|
||||||
|
"outputs": [
|
||||||
{
|
{
|
||||||
"id": 0,
|
"name": "MODEL",
|
||||||
"type": "CheckpointLoaderSimple",
|
"type": "MODEL",
|
||||||
"pos": [50, -200],
|
"links": [
|
||||||
"size": [300, 200],
|
1
|
||||||
"flags": {},
|
]
|
||||||
"order": 0,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "ckpt_name", "type": "STRING", "widget": {"name": "ckpt_name"}, "link": null}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "MODEL", "type": "MODEL", "links": [0]},
|
|
||||||
{"name": "CLIP", "type": "CLIP", "links": [1, 2]},
|
|
||||||
{"name": "VAE", "type": "VAE", "links": [3]}
|
|
||||||
],
|
|
||||||
"widgets_values": ["ace_step_1.5_turbo_swl_fused.safetensors"]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 1,
|
"name": "CLIP",
|
||||||
"type": "LoraLoader",
|
"type": "CLIP",
|
||||||
"pos": [300, -200],
|
"links": [
|
||||||
"size": [300, 200],
|
2
|
||||||
"flags": {},
|
]
|
||||||
"order": 1,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "lora_name", "type": "STRING", "widget": {"name": "lora_name"}, "link": null},
|
|
||||||
{"name": "strength_model", "type": "FLOAT", "widget": {"name": "strength_model"}, "link": null},
|
|
||||||
{"name": "strength_clip", "type": "FLOAT", "widget": {"name": "strength_clip"}, "link": null}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "MODEL", "type": "MODEL", "links": [4]},
|
|
||||||
{"name": "CLIP", "type": "CLIP", "links": [5, 6]}
|
|
||||||
],
|
|
||||||
"widgets_values": ["swl_voice_best_ep257.safetensors", 0.5, 0.5]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"name": "VAE",
|
||||||
"type": "ModelSamplingAuraFlow",
|
"type": "VAE",
|
||||||
"pos": [450, -200],
|
"links": [
|
||||||
"size": [300, 200],
|
3
|
||||||
"flags": {},
|
]
|
||||||
"order": 2,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "model", "type": "MODEL", "link": 0},
|
|
||||||
{"name": "shift", "type": "FLOAT", "widget": {"name": "shift"}, "link": null},
|
|
||||||
{"name": "sampling", "type": "COMBO", "widget": {"name": "sampling"}, "link": null}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "MODEL", "type": "MODEL", "links": [7]}
|
|
||||||
],
|
|
||||||
"widgets_values": [1.73, "flow"]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 3,
|
|
||||||
"type": "EmptyAceStep1.5LatentAudio",
|
|
||||||
"pos": [50, 100],
|
|
||||||
"size": [300, 200],
|
|
||||||
"flags": {},
|
|
||||||
"order": 3,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "seconds", "type": "FLOAT", "widget": {"name": "seconds"}, "link": null},
|
|
||||||
{"name": "batch_size", "type": "INT", "widget": {"name": "batch_size"}, "link": null}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "LATENT", "type": "LATENT", "links": [8]}
|
|
||||||
],
|
|
||||||
"widgets_values": [150, 1]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 4,
|
|
||||||
"type": "TextEncodeAceStepAudio1.5",
|
|
||||||
"pos": [450, 50],
|
|
||||||
"size": [500, 250],
|
|
||||||
"flags": {},
|
|
||||||
"order": 3,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "clip", "type": "CLIP", "link": 1},
|
|
||||||
{"name": "tags", "type": "STRING", "widget": {"name": "tags"}, "link": null},
|
|
||||||
{"name": "lyrics", "type": "STRING", "widget": {"name": "lyrics"}, "link": null},
|
|
||||||
{"name": "seed", "type": "INT", "widget": {"name": "seed"}, "link": null},
|
|
||||||
{"name": "bpm", "type": "INT", "widget": {"name": "bpm"}, "link": null},
|
|
||||||
{"name": "duration", "type": "FLOAT", "widget": {"name": "duration"}, "link": null},
|
|
||||||
{"name": "timesignature", "type": "COMBO", "widget": {"name": "timesignature"}, "link": null},
|
|
||||||
{"name": "language", "type": "COMBO", "widget": {"name": "language"}, "link": null},
|
|
||||||
{"name": "keyscale", "type": "COMBO", "widget": {"name": "keyscale"}, "link": null},
|
|
||||||
{"name": "generate_audio_codes", "type": "BOOLEAN", "widget": {"name": "generate_audio_codes"}, "link": null},
|
|
||||||
{"name": "cfg_scale", "type": "FLOAT", "widget": {"name": "cfg_scale"}, "link": null},
|
|
||||||
{"name": "temperature", "type": "FLOAT", "widget": {"name": "temperature"}, "link": null},
|
|
||||||
{"name": "top_p", "type": "FLOAT", "widget": {"name": "top_p"}, "link": null},
|
|
||||||
{"name": "top_k", "type": "INT", "widget": {"name": "top_k"}, "link": null},
|
|
||||||
{"name": "min_p", "type": "FLOAT", "widget": {"name": "min_p"}, "link": null}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "CONDITIONING", "type": "CONDITIONING", "links": [9]}
|
|
||||||
],
|
|
||||||
"widgets_values": ["", "", 42, 120, 150, "4", "zh", "C major", true, 3.0, 0.68, 0.88, 50, 0.02]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 5,
|
|
||||||
"type": "TextEncodeAceStepAudio1.5",
|
|
||||||
"pos": [450, 400],
|
|
||||||
"size": [500, 250],
|
|
||||||
"flags": {},
|
|
||||||
"order": 4,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "clip", "type": "CLIP", "link": 2},
|
|
||||||
{"name": "tags", "type": "STRING", "widget": {"name": "tags"}, "link": null},
|
|
||||||
{"name": "lyrics", "type": "STRING", "widget": {"name": "lyrics"}, "link": null},
|
|
||||||
{"name": "seed", "type": "INT", "widget": {"name": "seed"}, "link": null},
|
|
||||||
{"name": "bpm", "type": "INT", "widget": {"name": "bpm"}, "link": null},
|
|
||||||
{"name": "duration", "type": "FLOAT", "widget": {"name": "duration"}, "link": null},
|
|
||||||
{"name": "timesignature", "type": "COMBO", "widget": {"name": "timesignature"}, "link": null},
|
|
||||||
{"name": "language", "type": "COMBO", "widget": {"name": "language"}, "link": null},
|
|
||||||
{"name": "keyscale", "type": "COMBO", "widget": {"name": "keyscale"}, "link": null},
|
|
||||||
{"name": "generate_audio_codes", "type": "BOOLEAN", "widget": {"name": "generate_audio_codes"}, "link": null},
|
|
||||||
{"name": "cfg_scale", "type": "FLOAT", "widget": {"name": "cfg_scale"}, "link": null},
|
|
||||||
{"name": "temperature", "type": "FLOAT", "widget": {"name": "temperature"}, "link": null},
|
|
||||||
{"name": "top_p", "type": "FLOAT", "widget": {"name": "top_p"}, "link": null},
|
|
||||||
{"name": "top_k", "type": "INT", "widget": {"name": "top_k"}, "link": null},
|
|
||||||
{"name": "min_p", "type": "FLOAT", "widget": {"name": "min_p"}, "link": null}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "CONDITIONING", "type": "CONDITIONING", "links": [10]}
|
|
||||||
],
|
|
||||||
"widgets_values": ["", "", 42, 120, 150, "4", "zh", "C major", true, 3.0, 0.68, 0.88, 50, 0.0],
|
|
||||||
"title": "negative"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 6,
|
|
||||||
"type": "KSampler",
|
|
||||||
"pos": [1050, 100],
|
|
||||||
"size": [300, 250],
|
|
||||||
"flags": {},
|
|
||||||
"order": 5,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "model", "type": "MODEL", "link": 3},
|
|
||||||
{"name": "seed", "type": "INT", "widget": {"name": "seed"}, "link": null},
|
|
||||||
{"name": "steps", "type": "INT", "widget": {"name": "steps"}, "link": null},
|
|
||||||
{"name": "cfg", "type": "FLOAT", "widget": {"name": "cfg"}, "link": null},
|
|
||||||
{"name": "sampler_name", "type": "COMBO", "widget": {"name": "sampler_name"}, "link": null},
|
|
||||||
{"name": "scheduler", "type": "COMBO", "widget": {"name": "scheduler"}, "link": null},
|
|
||||||
{"name": "positive", "type": "CONDITIONING", "link": 9},
|
|
||||||
{"name": "negative", "type": "CONDITIONING", "link": 10},
|
|
||||||
{"name": "latent_image", "type": "LATENT", "link": 8},
|
|
||||||
{"name": "denoise", "type": "FLOAT", "widget": {"name": "denoise"}, "link": null}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "LATENT", "type": "LATENT", "links": [11]}
|
|
||||||
],
|
|
||||||
"widgets_values": [42, "fixed", 28, 2.0, "euler", "simple", 1.0]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 7,
|
|
||||||
"type": "VAEDecodeAudio",
|
|
||||||
"pos": [1450, 100],
|
|
||||||
"size": [300, 200],
|
|
||||||
"flags": {},
|
|
||||||
"order": 6,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "samples", "type": "LATENT", "link": 11},
|
|
||||||
{"name": "vae", "type": "VAE", "link": 3}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "AUDIO", "type": "AUDIO", "links": [12]}
|
|
||||||
],
|
|
||||||
"widgets_values": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 8,
|
|
||||||
"type": "SaveAudioAdvanced",
|
|
||||||
"pos": [1850, 100],
|
|
||||||
"size": [300, 200],
|
|
||||||
"flags": {},
|
|
||||||
"order": 7,
|
|
||||||
"mode": 0,
|
|
||||||
"inputs": [
|
|
||||||
{"name": "audio", "type": "AUDIO", "link": 12},
|
|
||||||
{"name": "filename_prefix", "type": "STRING", "widget": {"name": "filename_prefix"}, "link": null},
|
|
||||||
{"name": "format", "type": "COMBO", "widget": {"name": "format"}, "link": null}
|
|
||||||
],
|
|
||||||
"outputs": [
|
|
||||||
{"name": "AUDIO", "type": "AUDIO", "links": []}
|
|
||||||
],
|
|
||||||
"widgets_values": ["songforge/output", "wav"]
|
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"title": "① 加载融合模型",
|
||||||
|
"widgets_values": [
|
||||||
|
"ace_step_1.5_turbo_swl_fused.safetensors"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 2,
|
||||||
|
"type": "LoraLoader",
|
||||||
|
"pos": [
|
||||||
|
40,
|
||||||
|
180
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
360,
|
||||||
|
130
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 1,
|
||||||
|
"mode": 0,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"type": "MODEL",
|
||||||
|
"link": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "clip",
|
||||||
|
"type": "CLIP",
|
||||||
|
"link": 2
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "MODEL",
|
||||||
|
"type": "MODEL",
|
||||||
|
"links": [
|
||||||
|
5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CLIP",
|
||||||
|
"type": "CLIP",
|
||||||
|
"links": [
|
||||||
|
6
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "② LoRA声线加强",
|
||||||
|
"widgets_values": [
|
||||||
|
"swl_voice_best_ep257.safetensors",
|
||||||
|
0.5,
|
||||||
|
0.5
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 3,
|
||||||
|
"type": "ModelSamplingAuraFlow",
|
||||||
|
"pos": [
|
||||||
|
40,
|
||||||
|
350
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
300,
|
||||||
|
86
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 2,
|
||||||
|
"mode": 0,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"type": "MODEL",
|
||||||
|
"link": 5
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "MODEL",
|
||||||
|
"type": "MODEL",
|
||||||
|
"links": [
|
||||||
|
7
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"widgets_values": [
|
||||||
|
3.0,
|
||||||
|
"flow"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 4,
|
||||||
|
"type": "EmptyAceStep1.5LatentAudio",
|
||||||
|
"pos": [
|
||||||
|
40,
|
||||||
|
480
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
300,
|
||||||
|
90
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 3,
|
||||||
|
"mode": 0,
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "LATENT",
|
||||||
|
"type": "LATENT",
|
||||||
|
"links": [
|
||||||
|
8
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "④ 时长165秒",
|
||||||
|
"widgets_values": [
|
||||||
|
165,
|
||||||
|
1
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"type": "TextEncodeAceStepAudio1.5",
|
||||||
|
"pos": [
|
||||||
|
420,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
500,
|
||||||
|
620
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 4,
|
||||||
|
"mode": 0,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"name": "clip",
|
||||||
|
"type": "CLIP",
|
||||||
|
"link": 6
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "CONDITIONING",
|
||||||
|
"type": "CONDITIONING",
|
||||||
|
"links": [
|
||||||
|
9,
|
||||||
|
10
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "⑤ 《身体先听懂》歌词+标签",
|
||||||
|
"widgets_values": [
|
||||||
|
"swlvoice, Chinese urban hiphop, mid-tempo groovy boom bap, 94 BPM, laid back pocket drums, deep round kick, tight snare, swung lazy hi-hats, walking bass, jazzy rhodes chords, muted brass stabs, vinyl crackle, spacious urban dance track, strong memorable instrumental hook from first second, no acapella intro, male rap with clear space between phrases, catchy singable chorus, baritone vocal, groovy, cool, confident, dance friendly choreography, mid-tempo bounce, instrumental break with drums only, modern lo-fi urban production",
|
||||||
|
"[intro]\n[Instrumental: 强记法鼓点直接进入,闷响底鼓与松散摇摆hi-hat,低音贝斯走律动,rhodes电钢琴弹一段八小节循环hook,铜管闷响点缀,音色略带黑胶噪点,无人声无清唱,前奏8小节后进入verse]\n\n[verse 1]\n灯亮了 我先不动 先让肩膀听懂\n一拍一拍往下沉 膝盖自己会做决定\n右手抬到一半停 那个停顿也挺好听\n不用想 不用编 身体先知道往哪去\n\n[pre-chorus]\n慢 半拍 慢 半拍\n慢 半拍 就对了\n别跟声音较劲\n跟重心较劲\n\n[chorus]\n身体先听懂 它比脑子快一步\n脚一落地 世界就跟着晃一晃\n身体先听懂 它不讲道理不讲苦\n一转身 一抬手 谁都挡不住这股劲\n身体先听懂 别问它从哪儿学\n一拍 是它 两拍 还是它\n身体先听懂 停一下 继续走\n\n[break]\n[Instrumental: 鼓组独奏八小节,底鼓与军鼓交替,hi-hat十六分推进,适合wave与isolation编排,纯鼓无人声,末尾一记军鼓重音]\n\n[verse 2]\n软一下 是放松 不是放弃\n压下去 是力量 不是泄气\n抖一下 是放电 不是放弃\n卡住 是冻结 不是放弃\n\n[chorus]\n身体先听懂 它比脑子快一步\n脚一落地 世界就跟着晃一晃\n身体先听懂 它不讲道理不讲苦\n一转身 一抬手 谁都挡不住这股劲\n\n[rap]\n一 二 三 四 我从脚下开始数\n五 六 七 八 重心往右先溜\n肩 肘 手腕 三个关节接力\nwave 从胸口推到指尖才给你看\n不是炫技 是身体在说实话\n练到半夜 汗把地板都画\n一个动作做三千遍 变成肌肉就归家\n定格的呼吸 是我最拿手的表达\n拍子砸下来 我从地板把它抬\n\n[chorus]\n身体先听懂 别问它从哪儿学\n一拍 是它 两拍 还是它\n身体先听懂 停一下 继续走\n\n[break]\n[Instrumental: 鼓点持续十六小节,底鼓加重,铜管长鸣,适合footwork与连续popping编排,纯鼓无人声]\n\n[final chorus]\n身体先听懂 它比脑子快一步\n脚一落地 世界就跟着晃一晃\n身体先听懂 它不讲道理不讲苦\n一转身 一抬手 谁都挡不住这股劲\n身体先听懂 慢半拍也是对的\n慢半拍 慢半拍 就对了\n\n[outro]\n[Instrumental: 鼓点渐弱只留底鼓与rhodes,八小节loop hook再现,铜管一声长鸣收尾]\n慢 半拍 慢 半拍\n(就对了)",
|
||||||
|
26100304,
|
||||||
|
94,
|
||||||
|
165,
|
||||||
|
"4",
|
||||||
|
"zh",
|
||||||
|
"F minor",
|
||||||
|
true,
|
||||||
|
2.0,
|
||||||
|
0.85,
|
||||||
|
0.9,
|
||||||
|
0,
|
||||||
|
0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"type": "ConditioningZeroOut",
|
||||||
|
"pos": [
|
||||||
|
420,
|
||||||
|
680
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
240,
|
||||||
|
50
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 5,
|
||||||
|
"mode": 0,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"name": "conditioning",
|
||||||
|
"type": "CONDITIONING",
|
||||||
|
"link": 10
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "CONDITIONING",
|
||||||
|
"type": "CONDITIONING",
|
||||||
|
"links": [
|
||||||
|
11
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"type": "KSampler",
|
||||||
|
"pos": [
|
||||||
|
980,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
320,
|
||||||
|
262
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 6,
|
||||||
|
"mode": 0,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"name": "model",
|
||||||
|
"type": "MODEL",
|
||||||
|
"link": 7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "positive",
|
||||||
|
"type": "CONDITIONING",
|
||||||
|
"link": 9
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "negative",
|
||||||
|
"type": "CONDITIONING",
|
||||||
|
"link": 11
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "latent_image",
|
||||||
|
"type": "LATENT",
|
||||||
|
"link": 8
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "LATENT",
|
||||||
|
"type": "LATENT",
|
||||||
|
"links": [
|
||||||
|
12
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"widgets_values": [
|
||||||
|
26100304,
|
||||||
|
"fixed",
|
||||||
|
8,
|
||||||
|
1.0,
|
||||||
|
"euler",
|
||||||
|
"simple",
|
||||||
|
1.0
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"type": "VAEDecodeAudio",
|
||||||
|
"pos": [
|
||||||
|
1360,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
225,
|
||||||
|
70
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 7,
|
||||||
|
"mode": 0,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"name": "samples",
|
||||||
|
"type": "LATENT",
|
||||||
|
"link": 12
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "vae",
|
||||||
|
"type": "VAE",
|
||||||
|
"link": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "AUDIO",
|
||||||
|
"type": "AUDIO",
|
||||||
|
"links": [
|
||||||
|
13
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"type": "SaveAudioAdvanced",
|
||||||
|
"pos": [
|
||||||
|
1640,
|
||||||
|
40
|
||||||
|
],
|
||||||
|
"size": [
|
||||||
|
360,
|
||||||
|
160
|
||||||
|
],
|
||||||
|
"flags": {},
|
||||||
|
"order": 8,
|
||||||
|
"mode": 0,
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"name": "audio",
|
||||||
|
"type": "AUDIO",
|
||||||
|
"link": 13
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"title": "⑦ 保存《身体先听懂》",
|
||||||
|
"widgets_values": [
|
||||||
|
"MyMusic/urbanhiphop_身体先听懂_swl",
|
||||||
|
"flac"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"links": [
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
"MODEL"
|
||||||
],
|
],
|
||||||
"links": [
|
[
|
||||||
{"id": 0, "origin_id": 0, "origin_slot": 0, "target_id": 1, "target_slot": 0, "type": "MODEL"},
|
2,
|
||||||
{"id": 1, "origin_id": 0, "origin_slot": 1, "target_id": 4, "target_slot": 0, "type": "CLIP"},
|
1,
|
||||||
{"id": 2, "origin_id": 0, "origin_slot": 1, "target_id": 5, "target_slot": 0, "type": "CLIP"},
|
1,
|
||||||
{"id": 3, "origin_id": 1, "origin_slot": 0, "target_id": 2, "target_slot": 0, "type": "MODEL"},
|
2,
|
||||||
{"id": 4, "origin_id": 2, "origin_slot": 0, "target_id": 6, "target_slot": 0, "type": "MODEL"},
|
1,
|
||||||
{"id": 5, "origin_id": 2, "origin_slot": 1, "target_id": 5, "target_slot": 0, "type": "CLIP"},
|
"CLIP"
|
||||||
{"id": 6, "origin_id": 2, "origin_slot": 2, "target_id": 5, "target_slot": 1, "type": "CLIP"},
|
|
||||||
{"id": 7, "origin_id": 3, "origin_slot": 0, "target_id": 7, "target_slot": 0, "type": "LATENT"},
|
|
||||||
{"id": 8, "origin_id": 4, "origin_slot": 0, "target_id": 8, "target_slot": 0, "type": "LATENT"},
|
|
||||||
{"id": 9, "origin_id": 8, "origin_slot": 0, "target_id": 9, "target_slot": 0, "type": "CONDITIONING"},
|
|
||||||
{"id": 10, "origin_id": 9, "origin_slot": 0, "target_id": 6, "target_slot": 0, "type": "CONDITIONING"},
|
|
||||||
{"id": 11, "origin_id": 5, "origin_slot": 0, "target_id": 6, "target_slot": 1, "type": "CONDITIONING"},
|
|
||||||
{"id": 12, "origin_id": 6, "origin_slot": 0, "target_id": 7, "target_slot": 0, "type": "CONDITIONING"},
|
|
||||||
{"id": 13, "origin_id": 7, "origin_slot": 0, "target_id": 8, "target_slot": 0, "type": "AUDIO"},
|
|
||||||
{"id": 14, "origin_id": 8, "origin_slot": 2, "target_id": 8, "target_slot": 1, "type": "AUDIO"}
|
|
||||||
],
|
],
|
||||||
"groups": [],
|
[
|
||||||
"definitions": {}
|
3,
|
||||||
|
1,
|
||||||
|
2,
|
||||||
|
8,
|
||||||
|
1,
|
||||||
|
"VAE"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
5,
|
||||||
|
2,
|
||||||
|
0,
|
||||||
|
3,
|
||||||
|
0,
|
||||||
|
"MODEL"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
6,
|
||||||
|
2,
|
||||||
|
1,
|
||||||
|
5,
|
||||||
|
0,
|
||||||
|
"CLIP"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
7,
|
||||||
|
3,
|
||||||
|
0,
|
||||||
|
7,
|
||||||
|
0,
|
||||||
|
"MODEL"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
8,
|
||||||
|
4,
|
||||||
|
0,
|
||||||
|
7,
|
||||||
|
3,
|
||||||
|
"LATENT"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
9,
|
||||||
|
5,
|
||||||
|
0,
|
||||||
|
7,
|
||||||
|
1,
|
||||||
|
"CONDITIONING"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
10,
|
||||||
|
5,
|
||||||
|
0,
|
||||||
|
6,
|
||||||
|
0,
|
||||||
|
"CONDITIONING"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
11,
|
||||||
|
6,
|
||||||
|
0,
|
||||||
|
7,
|
||||||
|
2,
|
||||||
|
"CONDITIONING"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
12,
|
||||||
|
7,
|
||||||
|
0,
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
"LATENT"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
13,
|
||||||
|
8,
|
||||||
|
0,
|
||||||
|
9,
|
||||||
|
0,
|
||||||
|
"AUDIO"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"extra": {
|
||||||
|
"_meta": {
|
||||||
|
"title": "身体先听懂 · swl声线"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"version": 0.4
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user