Support TOML config, project venv, and public packaging.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
swl
2026-10-10 00:54:07 +08:00
co-authored by Cursor
parent 870dea0825
commit 487aacf864
16 changed files with 323 additions and 172 deletions
+5 -5
View File
@@ -165,7 +165,7 @@ python songforge\songforge.py selftest
|------|------|------------------------|
| 项目 | 新歌词 | `songforge/input/lyrics/` |
| 项目 | QC/风格基线 | `songforge/config/baseline/` |
| 本机 | 绝对路径覆盖 | `songforge/config/local.json`(gitignore) |
| 本机 | 绝对路径覆盖 | `songforge/config/local.toml`(gitignore) |
| 数据 | gen 产物 | `songforge/data/runs/YYYY-MM-DD/` |
| 数据 | 临时日志 | `songforge/data/tmp/YYYY-MM-DD/` |
| 数据 | 全局索引 | `songforge/index/catalog.jsonl` |
@@ -178,8 +178,8 @@ Agent 远程做歌请读 `songforge/AGENTS.md`。
| 想改 | 文件 |
|------|------|
| 模型 / 采样 / 时长区间 / 相对路径 | `config/default.json` |
| 本机 Comfy 根 / QC Python / 音乐目录 | `config/local.json`(从 example 复制) |
| 模型 / 采样 / 时长区间 / 相对路径 | `config/default.toml` |
| 本机 Comfy 根 / QC Python / 音乐目录 | `config/local.toml`(从 example 复制) |
| 风格 bpm/key/乐器/情绪 | `config/styles.json` |
| 禁词 | `config/lexicon.json` |
| QC 软阈值 | `config/baseline/qc_baseline.json`(工具校准,勿手拍) |
@@ -190,10 +190,10 @@ Agent 远程做歌请读 `songforge/AGENTS.md`。
### 3.2 优先级
```text
命令行 > SONGFORGE_* 环境变量 > config/local.json > config/default.json > DEFAULTS
命令行 > SONGFORGE_* 环境变量 > local.toml > default.toml > DEFAULTS
```
常用环境变量:`SONGFORGE_SERVER`、`SONGFORGE_COMFY_ROOT`、`SONGFORGE_QC_PYTHON`、`SONGFORGE_MUSIC_DIR`、`SONGFORGE_SHIFT`、`SONGFORGE_RUNS`。
算法配置用 TOML;Comfy workflow 图仍是 JSON。常用环境变量:`SONGFORGE_SERVER`、`SONGFORGE_COMFY_ROOT`、`SONGFORGE_QC_PYTHON`、`SONGFORGE_MUSIC_DIR`、`SONGFORGE_SHIFT`、`SONGFORGE_RUNS`。
### 3.3 已锁定默认(勿随意改)