> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/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 分辨率。

<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. **提示词**：描述两帧之间的过渡，以及您想要的音频（对白、音效、音乐）
