LTX-2 文生影片(蒸餾版)
使用LTX-2蒸餾模型將文字提示產生高品質影片,音訊與影片同步。專為快速產生最佳化,同時保持品質。支援表情嘴型、動態動作,產生速度更快。
下載工作流程在 Cloud 中試用 API 文件
關於
LTX-2 Text to Video(Distilled)工作流程用於將文字提示詞轉成高品質影片,並讓音訊與影像元素同步。此工作流程採用 LTX-2 distilled 模型,針對更快的影片生成做了最佳化,同時維持較高的品質。它包含具表現力的唇形同步與更有動態的動作生成,適合用於製作更具吸引力的影片內容。工作流程使用 SaveVideo 與 9b0e709c-82c7-46c0-a2e4-5e96b6f16090 等節點來處理與渲染最終影片輸出。由 Lightricks 開發的 LTX-2 模型可透過 Hugging Face 與 GitHub 取得,作為此工作流程的基礎。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用範例
工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"104": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/LTX-2",
"format": "auto",
"format.codec": "auto",
"video": [
"177:114",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"177:100": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "ltx-2-19b-distilled.safetensors"
},
"_meta": {
"title": "Load Checkpoint"
}
},
"177:101": {
"class_type": "LTXVAudioVAELoader",
"inputs": {
"ckpt_name": "ltx-2-19b-distilled.safetensors"
},
"_meta": {
"title": "Load LTXV Audio VAE"
}
},
"177:102": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"177:111",
0
],
"text": [
"177:109",
0
]
},
"_meta": {
"title": "enhanced prompt (positive)"
}
},
"177:103": {
"class_type": "LTXVConditioning",
"inputs": {
"frame_rate": [
"177:112",
0
],
"negative": [
"177:102",
0
],
"positive": [
"177:102",
0
]
},
"_meta": {
"title": "LTXVConditioning"
}
},
"177:106": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 24
},
"_meta": {
"title": "Frame Rate (Int)"
}
},
"177:109": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "A man in a black tuxedo stands motionless in a small, red-tiled bathroom, facing a mirror. The camera sits just behind his right shoulder, framing both his back and his solemn reflection. Suddenly, he opens his mouth and begins to sing opera in Italian: \"La donna è mobile, qual piuma al vento.\" Rich, resonant notes echo through the space. As his voice climbs in pitch, his brows lift, and his expression becomes more passionate, almost vulnerable. The overhead lighting casts a sharp glow on his face and tuxedo, reflecting in the glossy red tiles around him. The camera is static"
},
"_meta": {
"title": "Positive prompt"
}
},
"177:110": {
"class_type": "LatentUpscaleModelLoader",
"inputs": {
"model_name": "ltx-2-spatial-upscaler-x2-1.0.safetensors"
},
"_meta": {
"title": "Load Latent Upscale Model"
}
},
"177:111": {
"class_type": "LTXAVTextEncoderLoader",
"inputs": {
"ckpt_name": "ltx-2-19b-distilled.safetensors",
"device": "default",
"text_encoder": "gemma_3_12B_it_fp4_mixed.safetensors"
},
"_meta": {
"title": "Load LTXV Audio Text Encoder"
}
},
"177:112": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 24
},
"_meta": {
"title": "Frame Rate (Float)"
}
},
"177:113": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 121
},
"_meta": {
"title": "Frame Count"
}
},
"177:114": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"177:120",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"177:112",
0
],
"images": [
"177:119",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"177:115": {
"class_type": "LTXVEmptyLatentAudio",
"inputs": {
"audio_vae": [
"177:101",
0
],
"batch_size": 1,
"frame_rate": [
"177:106",
0
],
"frames_number": [
"177:113",
0
]
},
"_meta": {
"title": "Empty LTXV Latent Audio"
}
},
"177:116": {
"class_type": "EmptyLTXVLatentVideo",
"inputs": {
"batch_size": 1,
"height": [
"177:122",
1
],
"length": [
"177:113",
0
],
"width": [
"177:122",
0
]
},
"_meta": {
"title": "Empty LTXV Latent Video"
}
},
"177:117": {
"class_type": "ManualSigmas",
"inputs": {
"sigmas": "0.909375, 0.725, 0.421875, 0.0"
},
"_meta": {
"title": "ManualSigmas"
}
},
"177:118": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 420
},
"_meta": {
"title": "RandomNoise"
}
},
"177:119": {
"class_type": "VAEDecodeTiled",
"inputs": {
"overlap": 64,
"samples": [
"177:130",
0
],
"temporal_overlap": 8,
"temporal_size": 4096,
"tile_size": 512,
"vae": [
"177:100",
2
]
},
"_meta": {
"title": "VAE Decode (Tiled)"
}
},
"177:120": {
"class_type": "LTXVAudioVAEDecode",
"inputs": {
"audio_vae": [
"177:101",
0
],
"samples": [
"177:130",
1
]
},
"_meta": {
"title": "LTXV Audio VAE Decode"
}
},
"177:121": {
"class_type": "ImageScaleBy",
"inputs": {
"image": [
"177:131",
0
],
"scale_by": 0.5,
"upscale_method": "nearest-exact"
},
"_meta": {
"title": "Upscale Image By"
}
},
"177:122": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"177:121",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"177:123": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 45
},
"_meta": {
"title": "RandomNoise"
}
},
"177:124": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"177:100",
0
],
"negative": [
"177:103",
1
],
"positive": [
"177:103",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"177:125": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"177:127",
0
],
"latent_image": [
"177:132",
0
],
"noise": [
"177:123",
0
],
"sampler": [
"177:126",
0
],
"sigmas": [
"177:176",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"177:126": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler_ancestral"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"177:127": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"177:100",
0
],
"negative": [
"177:103",
1
],
"positive": [
"177:103",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"177:128": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"177:133",
1
],
"video_latent": [
"177:135",
0
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"177:129": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler_ancestral"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"177:130": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"177:134",
1
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"177:131": {
"class_type": "EmptyImage",
"inputs": {
"batch_size": 1,
"color": 0,
"height": 720,
"width": 1280
},
"_meta": {
"title": "Empty Image"
}
},
"177:132": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"177:115",
0
],
"video_latent": [
"177:116",
0
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"177:133": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"177:125",
1
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"177:134": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"177:124",
0
],
"latent_image": [
"177:128",
0
],
"noise": [
"177:118",
0
],
"sampler": [
"177:129",
0
],
"sigmas": [
"177:117",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"177:135": {
"class_type": "LTXVLatentUpsampler",
"inputs": {
"samples": [
"177:133",
0
],
"upscale_model": [
"177:110",
0
],
"vae": [
"177:100",
2
]
},
"_meta": {
"title": "LTXVLatentUpsampler"
}
},
"177:176": {
"class_type": "ManualSigmas",
"inputs": {
"sigmas": "1., 0.99375, 0.9875, 0.98125, 0.975, 0.909375, 0.725, 0.421875, 0.0"
},
"_meta": {
"title": "ManualSigmas"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
LTX-2 精煉模型兼顧生成速度與高品質,適合快速內容創作。
解析度需為 64 的倍數,影格數為 8 的倍數加 1,可維持最佳品質。
可以,流程支援最高 1920x1088,只要硬體足夠即可。
請聚焦描述核心動作與視覺細節,確保生成影片能精確反映你的敘事。