跳至內容

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 的基礎 checkpoint。

base_precision 預設 bf16

凍結基礎權重使用的精度;LoRA 參數維持 fp32。

預設 dora-rows

用於 LoRA 訓練的 adapter 系列。

可選的 `.safetensors` LoRA checkpoint URL,用於繼續訓練。

預設 0.0001

AdamW 套用於 LoRA 參數的學習率。

預設 16

LoRA adapter 的 rank。

預設 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 的基礎 checkpoint。
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 的 rank。
adapter_type選填
類型enum
預設值dora-rows
loradoradora-rowsdora-colsboralora-xsdora-rows-xsdora-cols-xsbora-xs
用於 LoRA 訓練的 adapter 系列。
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 checkpoint URL,用於繼續訓練。
pre_encode選填
類型boolean
預設值false
在 LoRA 訓練前,將音訊封存檔預先編碼為 SAME latents。
必填

輸出

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-TW/developers/models/stable-audio-3-trainer.md. 所有模型與指南: https://doitong.com/developers/llms.txt