跳转到内容

Stable Audio 3 Trainer

集成

模型 id stable-audio-3-trainer
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/stable-audio-3-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio_data_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

与示例类似的文件: $3.00 3,000 API 积分 运行前会测量你的文件 在此页面运行

获取 API 密钥
Stability AI 训练 1–380 秒 #music#audio#sfx#lora

根据带有匹配文本说明的音频片段 zip,为 Stable Audio 3 训练 LoRA

Stability AI · 文件

你的第一个结果将在此显示

在下方构建请求,并使用你的 API 密钥运行。输出会复制到我们的存储中,可永久保存或免费保存 7 天。

构建请求

控件根据模型架构生成。更改控件时,代码和价格会同步更新。

•必填

数据集 zip URL,每个音频/字幕对以匹配的基本文件名共同存储:例如 `clip.wav` 与 `clip.txt` 配对。字幕必须使用 `.txt` 扩展名。

默认 1000

LoRA 训练的步骤数。

裁剪/填充时长,以秒计;任何情况下都受所选模型原生训练长度限制。提供长度,或省略该值以使用数据集中检测到的最长片段,但不能超过该上限。

默认 1

训练期间使用的批量大小。

高级 model · base_precision · adapter_type · lora_checkpoint_url · learning_rate · rank · seed · pre_encode · include · exclude
model 默认 medium-base

用于微调 Stable Audio 3 的基础检查点。

base_precision 默认 bf16

冻结基础权重使用的精度;LoRA 参数仍保持 fp32。

默认 dora-rows

用于 LoRA 训练的适配器系列。

可选的 `.safetensors` LoRA 检查点 URL,用于恢复训练。

默认 0.0001

AdamW 应用于 LoRA 参数的学习率。

默认 16

LoRA 适配器的秩。

默认 42

随机化种子。

限制 LoRA 添加位置的模块名称子字符串:只有匹配的模块会接收 LoRA。

用于排除匹配模块的名称子字符串。

POST /run/stable-audio-3-trainer?wait=20 报价 → $3.00
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/stable-audio-3-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "audio_data_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

运行此请求

你的密钥会保留在此浏览器中:仅发送到 Doitong API;只有勾选“记住”后才会保存到 localStorage。 获取 API 密钥

关于 Stable Audio 3 Trainer

在 `audio_data_url` 指向的 zip 上微调基础检查点(medium-base、small-music-base 或 small-sfx-base);其中每个音频文件都必须有同名的 `.txt` 说明文件。可调整 `number_of_steps`(最多 20000)、`learning_rate`、`rank`(1 到 256)、`adapter_type` 和 `batch_size`,也可以从 `.safetensors` 检查点继续训练。返回 LoRA 权重和配置文件。

参数

名称类型 默认值允许值 描述
audio_data_url必填
类型string
数据集 zip URL,每个音频/字幕对以匹配的基本文件名共同存储:例如 `clip.wav` 与 `clip.txt` 配对。字幕必须使用 `.txt` 扩展名。
model可选
类型enum
默认值medium-base
medium-basesmall-music-basesmall-sfx-base
用于微调 Stable Audio 3 的基础检查点。
number_of_steps可选
类型integer
默认值1000
1 – 20,000
LoRA 训练的步骤数。
learning_rate可选
类型number
默认值0.0001
≤ 0.01> 0
AdamW 应用于 LoRA 参数的学习率。
rank可选
类型integer
默认值16
1 – 256
LoRA 适配器的秩。
adapter_type可选
类型enum
默认值dora-rows
loradoradora-rowsdora-colsboralora-xsdora-rows-xsdora-cols-xsbora-xs
用于 LoRA 训练的适配器系列。
duration可选
类型number | null
1 – 380
裁剪/填充时长,以秒计;任何情况下都受所选模型原生训练长度限制。提供长度,或省略该值以使用数据集中检测到的最长片段,但不能超过该上限。
batch_size可选
类型integer
默认值1
1 – 8
训练期间使用的批量大小。
seed可选
类型integer
默认值42
0 – 2,147,483,647
随机化种子。
base_precision可选
类型enum
默认值bf16
bf16bfloat16fp16float16
冻结基础权重使用的精度;LoRA 参数仍保持 fp32。
include可选
类型string[]
限制 LoRA 添加位置的模块名称子字符串:只有匹配的模块会接收 LoRA。
exclude可选
类型string[]
用于排除匹配模块的名称子字符串。
lora_checkpoint_url可选
类型string | null
可选的 `.safetensors` LoRA 检查点 URL,用于恢复训练。
pre_encode可选
类型boolean
默认值false
在 LoRA 训练前,将音频存档预编码为 SAME 潜变量。
必填

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "stable-audio-3-trainer",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 3000,
    "usd": "3.00",
    "charged": 3000,
    "refunded": 0
  },
  "input": {
    "audio_data_url": "https://content.doitong.com/audio/showcase/v3/tools/dub_es.mp3"
  },
  "output": {
    "lora_file": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "config_file": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
你的文件,由你选择每个 outputs[].url 都是存储中的副本:可永久保存(按 GB-月付费),也可免费保存 7 天,由账户设置或 ?storage= 决定。
每个模型的结构相同图像、视频和音频均包含 type、url、content_type、width、height 和 duration。output 是模型自身的结果对象。
输出字段
lora_file
object {url, content_type, file_name, file_size}为 Stable Audio 3 训练的 LoRA 权重。
config_file
object {url, content_type, file_name, file_size}描述训练运行及兼容推理模型的 JSON 元数据。

对于 AI 代理:此页面的 Markdown 版本位于 https://doitong.com/zh/developers/models/stable-audio-3-trainer.md. 所有模型和指南: https://doitong.com/developers/llms.txt