跳转到内容

TRELLIS.2 Trainer

集成

模型 id trellis-2-lora-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/trellis-2-lora-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data_url": "https://example.com/your-file.zip"
  }'

# 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"

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

获取 API 密钥
Microsoft 训练

使用包含 3D 资产的 zip 为 Trellis 2 训练 LoRA 适配器,最多支持三个去噪器

Microsoft · 文件

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

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

构建请求

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

resolution 默认 512

训练分辨率必须等于数据集的预处理分辨率。Geometry 和 texture 训练分别为 512 和 1024 提供独立配置,而 sparse-structure 训练在这些分辨率之间共享配置。

rank 默认 32

LoRA 适配器的秩;值越大,适配器容量越高。

•必填

数据集存档 URL:提供打包为 .zip 的原始 3D 资源,或使用 data_preprocessing 返回的预处理 TRELLIS.2 数据集 zip。

默认 1000

训练步数总量。

从 sparse_structure、geometry 和 texture 中选择 1–3 个不同的 TRELLIS.2 降噪器进行微调。并行训练使用共享的预处理数据集,并为每个选定条目生成单独的 LoRA 适配器。

高级 learning_rate
默认 0.0001

用于优化 LoRA 的学习率。

POST /run/trellis-2-lora-trainer?wait=20 报价 → $15.973
# 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/trellis-2-lora-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data_url": "https://example.com/your-file.zip"
  }'

# 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 密钥

关于 TRELLIS.2 Trainer

从 `data_url` 中的 zip 微调适配器,该 zip 包含原始 3D 资产或预处理数据集。`denoisers` 选择 1 到 3 个目标,每个目标都会训练为独立适配器。设置包括:`resolution` 512 或 1024、`rank` 16、32 或 64、`learning_rate`,以及 100 到 10000 的 `training_steps`。返回适配器、所有失败信息和可复用的预处理数据。

参数

名称类型 默认值允许值 描述
data_url必填
类型string
数据集存档 URL:提供打包为 .zip 的原始 3D 资源,或使用 data_preprocessing 返回的预处理 TRELLIS.2 数据集 zip。
denoisers可选
类型enum[]
≤ 3 个项目
从 sparse_structure、geometry 和 texture 中选择 1–3 个不同的 TRELLIS.2 降噪器进行微调。并行训练使用共享的预处理数据集,并为每个选定条目生成单独的 LoRA 适配器。
resolution可选
类型enum
默认值512
5121024
训练分辨率必须等于数据集的预处理分辨率。Geometry 和 texture 训练分别为 512 和 1024 提供独立配置,而 sparse-structure 训练在这些分辨率之间共享配置。
rank可选
类型enum
默认值32
163264
LoRA 适配器的秩;值越大,适配器容量越高。
learning_rate可选
类型number
默认值0.0001
0.000001 – 0.01
用于优化 LoRA 的学习率。
training_steps可选
类型integer
默认值1000
100 – 10,000
训练步数总量。
必填

输出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "trellis-2-lora-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": 15973,
    "usd": "15.973",
    "charged": 15973,
    "refunded": 0
  },
  "input": {
    "data_url": "https://example.com/your-file.zip"
  },
  "output": {
    "adapters": [
      {
        "denoiser": "sparse_structure",
        "resolution": 1,
        "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
        },
        "rank": 1,
        "training_steps": 1,
        "learning_rate": 1.0
      }
    ],
    "failed": [
      {
        "denoiser": "sparse_structure",
        "error": "string"
      }
    ],
    "preprocessed_data_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 是模型自身的结果对象。
输出字段
adapters
array of object {denoiser, resolution, lora_file, rank, training_steps, learning_rate}映射到相应 trellis-2-lora 推理字段的 LoRA 适配器文件。响应会为训练成功的每个降噪器包含一个适配器;将其文件用于匹配的字段。
failed
array of object {denoiser, error}未成功的降噪器训练结果;这里只显示训练未完成的降噪器,因此所有请求的降噪器均成功时此字段为空。
preprocessed_data_file
object {url, content_type, file_name, file_size}训练期间使用且可重复使用的预处理 TRELLIS.2 数据集 zip。

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