> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-docs-custom-nodes-sdk-v2-frontend.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 在 ComfyUI 中使用 LTX-2.5 API 生成视频

> 了解如何结合云端工作流，在 ComfyUI 中使用 LTX-2.5 API 节点进行文生视频、图生视频和首尾帧生视频，并提供 Fast 与 Pro 两种模型档位。

[LTX-2.5](https://ltx.io/model/ltx-2-5) 是 Lightricks 的开源权重视频与世界模型，可通过 LTX-2.5 API 节点在 ComfyUI 中使用。API 工作流在 Lightricks 的服务器上运行生成任务，因此无需下载模型，也不要求本地 GPU，每生成一秒视频都会计入您的 Comfy API 账户。

LTX-2.5 API 提供两个模型档位：**LTX-2.5 (Pro)** 用于追求最高质量，**LTX-2.5 (Fast)** 则使用蒸馏模型实现更快的生成。两个档位都支持音频与视频的同步生成，并原生支持多镜头场景；Fast 档位最高可输出 4K 分辨率。

## LTX-2.5 擅长什么

* **同步音频和视频**：两种模型层级都会同时生成音频和视频，并原生支持多镜头场景
* **两种模型层级**：LTX-2.5 (Pro) 提供最高质量，LTX-2.5 (Fast) 通过蒸馏模型实现更快的生成速度
* **最高 4K 输出**：Fast 层级最高可输出 4K 分辨率
* **无需本地 GPU**：生成过程在 Lightricks 的服务器上运行，无需下载模型
* **多种生成模式**：文生视频、图生视频和首尾帧生视频

## 示例输出

带同步音频的文生视频生成：

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_ltx2_5_t2v.mp4" />

基于单张起始图像的图生视频生成：

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_ltx2_5_i2v.mp4" />

首尾帧生视频生成，将两帧画面融合为一个动画序列：

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_ltx2_5_flf2v.mp4" />

<Tip>
  使用 API 节点需要保证你已经正常登录，并在受许可的网络环境下使用，请参考[API 节点总览](/zh/tutorials/partner-nodes/overview)部分文档来了解使用 API 节点的具体使用要求。
</Tip>

<Tip>
  <Tabs>
    <Tab title="本地用户">
      请确保你的 ComfyUI 已经更新。

      * [ComfyUI 下载](https://www.comfy.org/download)
      * [ComfyUI 更新教程](/zh/installation/update_comfyui)

      本指南里的工作流可以在[工作流模板](/zh/interface/features/template)中找到。如果找不到，可能是 ComfyUI 没有更新。

      如果加载工作流时有节点缺失，可能原因有：

      1. 你用的不是最新版（每夜版）。
      2. 启动时有些节点导入失败。
    </Tab>

    <Tab title="云端用户">
      * [Cloud](https://cloud.comfy.org) 会在 ComfyUI 稳定版本发布后更新。

      所以，如果你发现本文档中有任何核心节点缺失，可能是因为新核心节点尚未在最新稳定版中发布。请等待下一个稳定版发布。
    </Tab>
  </Tabs>
</Tip>

## LTX-2.5 API 工作流

模板库附带了三个 API 示例工作流：

* **文生视频**：根据文本提示生成视频
* **图生视频**：根据单张起始图像生成视频
* **FLF2V**：在第一帧和最后一帧图像之间生成视频

### LTX-2.5 文生视频

通过 LTX-2.5 API 根据文本提示生成视频，并带有同步音频。

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_ltx2_5_t2v.mp4" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=api_ltx2_5_t2v&utm_source=docs&utm_medium=referral&utm_campaign=ltx-2-5-api">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_ltx2_5_t2v.json">
    下载 JSON，或在模板库中搜索“LTX-2.5 T2V”
  </Card>
</CardGroup>

#### 提示技巧

1. **模型**：选择 `LTX-2.5 (Pro)` 以获得最高质量，或选择 `LTX-2.5 (Fast)` 以加快生成速度
2. **时长**：Pro 支持 2-10 秒，Fast 支持 2-20 秒。时长超过 10 秒需要使用 720p 或 1080p 分辨率，以及 24/25 FPS
3. **分辨率与比例**：选择分辨率预设，例如 `1280x720`（横向）或 `720x1280`（纵向）；Fast 还提供 `2560x1440` 和 `3840x2160` 选项
4. **FPS**：Fast 可在 24、25、48 或 50 FPS 之间选择，Pro 可在 24、25 或 50 FPS 之间选择
5. **音频**：音频生成默认开启；如果只需要静音视频，可以在节点的高级设置中关闭
6. **提示词**：用一个连贯的段落描述整个场景，包括镜头、动作、角色、相机移动，以及你想要的音频

### LTX-2.5 图生视频

通过 LTX-2.5 API 从单张起始图像生成视频，并带有同步音频。

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_ltx2_5_i2v.mp4" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=api_ltx2_5_i2v&utm_source=docs&utm_medium=referral&utm_campaign=ltx-2-5-api">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_ltx2_5_i2v.json">
    下载 JSON，或在模板库中搜索“LTX-2.5 I2V”
  </Card>
</CardGroup>

<CardGroup cols={1}>
  <Card title="输入图像：space_battle.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/space_battle.png">
    工作流的起始帧，或使用你自己的图像。
  </Card>
</CardGroup>

#### 提示技巧

1. **模型**：此工作流默认选择 `LTX-2.5 (Fast)` 以便更快迭代；如需最高质量，可切换到 `LTX-2.5 (Pro)`
2. **仅单张图像**：图像输入只接受一张起始图像
3. **提示词**：描述接下来会发生什么：从起始图像延续的运动、相机移动和声音。使用“将提供的起始图像作为第一帧”之类的表述有助于稳定生成
4. **时长与分辨率**：Fast 支持最长 20 秒和最高 4K 分辨率；超过 10 秒的时长需要 720p/1080p 分辨率及 24/25 FPS

### LTX-2.5 FLF2V

通过 LTX-2.5 API 在第一帧和最后一帧图像之间生成视频，将两帧融合成一个动画序列。

<video controls className="w-full aspect-video" src="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/output/api_ltx2_5_flf2v.mp4" />

<CardGroup cols={2}>
  <Card title="在 Comfy Cloud 上运行" icon="cloud" href="https://cloud.comfy.org/?template=api_ltx2_5_flf2v&utm_source=docs&utm_medium=referral&utm_campaign=ltx-2-5-api">
    在 Comfy Cloud 中打开
  </Card>

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_ltx2_5_flf2v.json">
    下载 JSON，或在模板库中搜索“LTX-2.5 FLF2V”
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="第一帧：porsche_car_01.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/porsche_car_01.png">
    视频的第一帧。
  </Card>

  <Card title="最后一帧：porsche_car_02.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/porsche_car_02.png">
    视频的最后一帧，连接到节点的 `last_frame` 输入。
  </Card>
</CardGroup>

#### 提示技巧

1. **帧**：工作流将第一张图像连接到 `image` 输入，将第二张图像连接到 `last_frame` 输入；模型生成两帧之间的运动
2. **保持帧对齐**：使用宽高比相同的图像，以获得平滑的插值
3. **模型**：此工作流默认选择 `LTX-2.5 (Pro)`；如需加快生成速度，可切换到 `LTX-2.5 (Fast)`
4. **提示词**：描述帧之间的过渡，以及你想要的音频（对白、音效、音乐）
