> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# HeyGen Video 1.0：在 ComfyUI 中通过文本、图像与参考生成视频

> 在 ComfyUI 中通过提示词、首帧图像，或最多 12 个参考图像、视频和音频片段，生成 5 到 15 秒带同步对白的视频

**HeyGen Video 1.0** 是 HeyGen 推出的通用视频模型，可一次生成画面、台词与环境音。你只需在提示词中描述镜头与对白，返回的视频片段便带有同步语音，因此口播视频或产品视频无需拍摄、无需真人出镜，也无需单独的配音环节。

在 ComfyUI 中，该模型通过两个合作节点运行。**HeyGen Video 1.0 Reference to Video** 可独立完成文本到视频，并在连接图像、视频或音频后执行参考到视频；**HeyGen Video 1.0 Image to Video** 则从首帧开始生成。两者都是云端 API 节点：需要拥有带积分的 Comfy 账户，且不会下载任何本地模型。每秒计费标准请参见[合作伙伴节点积分](/zh/tutorials/partner-nodes/pricing)。

每次运行都会返回一段 5 到 15 秒、分辨率为 480p 或 768p 的视频片段，其中的对白、环境底噪以及音乐都已包含在视频中。

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

## 可用的工作流

### 文生视频

仅凭提示词生成一段视频片段。提示词承载动作、台词和声音，因此一次节点运行即可返回一段制作完成的说话视频片段。

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

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

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_heygen_video_1_t2v.json">
    下载 JSON，或在模板库中搜索 "HeyGen Video 1.0: Text to Video"
  </Card>
</CardGroup>

文生视频模板运行 Reference to Video 节点时不连接任何输入，这就是该节点的文生视频模式。

### 图生视频

为一张图像添加动画。该图像是视频片段的首帧，输出会保持其宽高比，因此当你需要不同的形状时，请先裁剪图像。提示词决定画面中发生什么以及说了什么。

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

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

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_heygen_video_1_i2v.json">
    下载 JSON，或在模板库中搜索 "HeyGen Video 1.0: Image to Video"
  </Card>
</CardGroup>

**输入素材**

<Card title="model_red_curls_ring.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/model_red_curls_ring.png">
  加载到为 HeyGen Video 1.0 Image to Video 节点提供输入的 `LoadImage` 节点中
</Card>

### 参考生视频

通过将人物、产品和场景作为参考连接起来，让它们在整段镜头中保持一致：最多 9 张图像、3 段视频和 3 段音频，共计 12 个。提示词随后以 `@Image1`、`@Video1` 和 `@Audio1` 来引用它们，按类型依据输入顺序编号。

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

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

  <Card title="下载工作流" icon="download" href="https://github.com/Comfy-Org/workflow_templates/blob/main/templates/api_heygen_video_1_r2v.json">
    下载 JSON，或在模板库中搜索 "HeyGen Video 1.0: Reference to Video"
  </Card>
</CardGroup>

**输入素材**

<CardGroup cols={2}>
  <Card title="model_black_blazer_red_earrings.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/model_black_blazer_red_earrings.png">
    加载到第一个参考图像槽位 · `@Image1`
  </Card>

  <Card title="cognac_leather_handbag.png" icon="image" href="https://raw.githubusercontent.com/Comfy-Org/workflow_templates/main/input/cognac_leather_handbag.png">
    加载到第二个参考图像槽位 · `@Image2`
  </Card>
</CardGroup>

## 节点控件

| 控件 | 取值 | 适用节点 | 效果 |
| - | - | - | - |
| `prompt` | 文本，最多 32000 个字符 | 两个节点 | 镜头、台词和声音。参考媒体以 `@Image1`、`@Video1`、`@Audio1` 的形式引用 |
| `duration` | 5 至 15 秒 | 两个节点 | 滑块，默认 5 |
| `resolution` | `480p`、`768p` | 两个节点 | 输出分辨率 |
| `aspect_ratio` | `auto`、`16:9`、`9:16`、`1:1`、`4:3`、`3:4`、`21:9` | Reference to Video | 未连接任何内容时，`auto` 为 16:9。连接了参考素材时，它跟随第一张参考图像；若未连接任何图像，则跟随第一个参考视频 |
| `seed` | 整数 | 两个节点 | 即使使用相同的种子，不同次运行的结果仍可能有差异 |
| `reference_images` | 最多 9 | Reference to Video | 每个槽位一张图像。在单个槽位上使用批处理输入会被拒绝 |
| `reference_videos` | 最多 3 | Reference to Video | 每个槽位一个视频 |
| `reference_audios` | 最多 3 | Reference to Video | 至少需要连接一个参考图像或参考视频。声音参考需要几秒钟干净的语音 |

Image to Video 节点接收图像、提示词、时长、分辨率和种子。它没有宽高比控件，因为首帧决定了片段的形状。

## 提示技巧

* **把台词写进提示词**。将对话放在引号里，作为镜头描述的一部分，这样模型就会说出这句台词并匹配唇部动作。两个模板都附带了很长的示例提示词来展示这种写法：先写镜头和主体，再用引号写台词，最后写声音和相机语言。
* **用画面描述声音**。环境底噪、一段音乐，或某个动作发出的声响，都要写进提示词里，而不是用某个控件来设置。示例提示词以环境音结尾，例如安静的房间底噪中夹杂一声微弱的水壶鸣音，或放下物体时轻轻的玻璃碰撞声。
* **保持产品或出镜人物一致**。将产品或人物作为参考图像连接，并在提示词中为其命名，然后描述它必须保持不变的方面，例如保持 `@Image2` 中包袋的准确颜色、比例和五金件。
* **用参考塑造镜头**。当 `aspect_ratio` 设为 `auto` 时，构图会跟随第一张参考图像，因此你最先连接的参考决定了视频的形状。
* **预期每次运行都会有差异**。种子并不会锁定结果；相同的设置仍然可能生成不同的效果。

## 开始使用

1. 将 ComfyUI 更新至最新版本
2. 前往模板库，搜索 `HeyGen Video 1.0`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.