内置节点参考
Kling Text to Video (Camera Control) - ComfyUI 原生节点文档
使用摄像机控制功能的Kling文本到视频生成节点

Kling Text to Video (Camera Control) 节点允许用户将文本转换为具有专业摄像机动作的视频。该节点是标准 Kling Text to Video 节点的扩展版本,增加了摄像机控制功能。
参数说明
必需参数
| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| prompt | 字符串 | "" | 描述要生成视频内容的文本提示词 |
| negative_prompt | 字符串 | "" | 指定不希望在视频中出现的元素 |
| cfg_scale | 浮点数 | 7.0 | 配置缩放值,控制对提示词的遵循程度 |
| aspect_ratio | 选择项 | "16:9" | 输出视频的宽高比 |
| camera_control | CAMERA_CONTROL | 无 | 摄像机控制配置,必须通过 Kling Camera Controls 节点创建 |
固定参数
注意:以下参数在节点内部已固定设置,用户无法修改:
- 模型名称:kling-v1-5
- 模式:pro
- 视频时长:5秒
输出
| 输出 | 类型 | 说明 |
|---|---|---|
| VIDEO | 视频 | 生成的视频结果 |
源码参考
[节点源码 (更新于2025-05-03)]
class KlingCameraControlT2VNode(KlingTextToVideoNode):
"""
Kling Text to Video Camera Control Node. This node is a text to video node, but it supports controlling the camera.
Duration, mode, and model_name request fields are hard-coded because camera control is only supported in pro mode with the kling-v1-5 model at 5s duration as of 2025-05-02.
"""
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"prompt": model_field_to_node_input(
IO.STRING, KlingText2VideoRequest, "prompt", multiline=True
),
"negative_prompt": model_field_to_node_input(
IO.STRING,
KlingText2VideoRequest,
"negative_prompt",
multiline=True,
),
"cfg_scale": model_field_to_node_input(
IO.FLOAT, KlingText2VideoRequest, "cfg_scale"
),
"aspect_ratio": model_field_to_node_input(
IO.COMBO,
KlingText2VideoRequest,
"aspect_ratio",
enum_type=AspectRatio,
),
"camera_control": (
"CAMERA_CONTROL",
{
"tooltip": "Can be created using the Kling Camera Controls node. Controls the camera movement and motion during the video generation.",
},
),
},
"hidden": {"auth_token": "AUTH_TOKEN_COMFY_ORG"},
}
DESCRIPTION = "Transform text into cinematic videos with professional camera movements that simulate real-world cinematography. Control virtual camera actions including zoom, rotation, pan, tilt, and first-person view, while maintaining focus on your original text."
def api_call(
self,
prompt: str,
negative_prompt: str,
cfg_scale: float,
aspect_ratio: str,
camera_control: Optional[CameraControl] = None,
auth_token: Optional[str] = None,
):
return super().api_call(
model_name="kling-v1-5",
cfg_scale=cfg_scale,
mode="pro",
aspect_ratio=aspect_ratio,
duration="5",
prompt=prompt,
negative_prompt=negative_prompt,
camera_control=camera_control,
auth_token=auth_token,
)官方原文
本页来自 Comfy-Org 官方中文文档的固定版本,并转换为 xueai 静态页面。内容以官方持续更新的页面为准。