LTX-2.5:文字轉影片
使用 LTX-2.5 由文字提示生成電影感影片,這是一款適合正式製作的擴散模型,可輸出單一影片檔,並可選擇空間放大以提升解析度。適用於電影預視、商業分鏡與大量內容產製流程。
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
Loading the graph
Open full-size workflow preview從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
# 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({
"75": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/LTX_2.5_t2v",
"format": "auto",
"format.codec": "auto",
"video": [
"405:370",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"409": {
"class_type": "ResolutionSelector",
"inputs": {
"aspect_ratio": "16:9 (Widescreen)",
"megapixels": 0.9,
"multiple": 32
},
"_meta": {
"title": "Resolution Selector"
}
},
"405:338": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 42
},
"_meta": {
"title": "RandomNoise"
}
},
"405:339": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 558811532553686
},
"_meta": {
"title": "RandomNoise"
}
},
"405:340": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"405:367",
1
],
"video_latent": [
"405:348",
0
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"405:341": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler_ancestral"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"405:344": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"405:388",
0
],
"latent_image": [
"405:377",
0
],
"noise": [
"405:339",
0
],
"sampler": [
"405:352",
0
],
"sigmas": [
"405:404",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"405:348": {
"class_type": "LTXVLatentUpsampler",
"inputs": {
"samples": [
"405:367",
0
],
"upscale_model": [
"405:371",
0
],
"vae": [
"405:385",
0
]
},
"_meta": {
"title": "LTXVLatentUpsampler"
}
},
"405:352": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler_ancestral"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"405:353": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a/2",
"values.a": [
"405:372",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"405:355": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a/2",
"values.a": [
"405:360",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"405:356": {
"class_type": "EmptyLTXVLatentVideo",
"inputs": {
"batch_size": 1,
"height": [
"405:355",
1
],
"length": [
"405:378",
1
],
"width": [
"405:353",
1
]
},
"_meta": {
"title": "Empty LTXV Latent Video"
}
},
"405:358": {
"class_type": "LTXVAudioVAEDecode",
"inputs": {
"audio_vae": [
"405:386",
0
],
"samples": [
"405:369",
1
]
},
"_meta": {
"title": "LTXV Audio VAE Decode"
}
},
"405:359": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a",
"values.a": [
"405:361",
0
]
},
"_meta": {
"title": "Math Expression (fps)"
}
},
"405:360": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"409",
1
]
},
"_meta": {
"title": "Height"
}
},
"405:361": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 24
},
"_meta": {
"title": "Frame Rate"
}
},
"405:362": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 5
},
"_meta": {
"title": "Duration"
}
},
"405:364": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"405:387",
0
],
"text": [
"405:382",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"405:365": {
"class_type": "LTXVConditioning",
"inputs": {
"frame_rate": [
"405:359",
0
],
"negative": [
"405:373",
0
],
"positive": [
"405:364",
0
]
},
"_meta": {
"title": "LTXVConditioning"
}
},
"405:366": {
"class_type": "LTXVEmptyLatentAudio",
"inputs": {
"audio_vae": [
"405:386",
0
],
"batch_size": 1,
"frame_rate": [
"405:359",
1
],
"frames_number": [
"405:378",
1
]
},
"_meta": {
"title": "Empty LTXV Latent Audio"
}
},
"405:367": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"405:344",
0
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"405:368": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"405:391",
0
],
"latent_image": [
"405:340",
0
],
"noise": [
"405:338",
0
],
"sampler": [
"405:341",
0
],
"sigmas": [
"405:395",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"405:369": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"405:368",
0
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"405:370": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"405:358",
0
],
"bit_depth": 8,
"codec": "none",
"color_space": "sRGB",
"fps": [
"405:359",
0
],
"images": [
"405:374",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"405:371": {
"class_type": "LatentUpscaleModelLoader",
"inputs": {
"model_name": "ltx-2.5-latent-spatial-upscaler-x2-bf16-1.0.safetensors"
},
"_meta": {
"title": "Load Latent Upscale Model"
}
},
"405:372": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"409",
0
]
},
"_meta": {
"title": "Width"
}
},
"405:373": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"405:387",
0
],
"text": "pc game, console game, video game, cartoon, childish, ugly"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"405:374": {
"class_type": "VAEDecodeTiled",
"inputs": {
"overlap": 64,
"samples": [
"405:369",
0
],
"temporal_overlap": 32,
"temporal_size": 4096,
"tile_size": 768,
"vae": [
"405:385",
0
]
},
"_meta": {
"title": "VAE Decode (Tiled)"
}
},
"405:376": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Low-angle cinematic close-up shot on an 85mm anamorphic prime lens, revealing an astronaut’s contemplative face behind a curved, rain-streaked helmet glass. Cold, diffuse moonlight and pale emerald reflections from an alien aurora wash softly across the glass, creating a quiet, melancholic atmosphere. The muted palette consists of deep sea-green, faded indigo, and soft silver highlights. The camera executes a slow dolly push-in toward the face as the subject blinks slowly, their steady breath faintly fogging the interior glass before evaporating. Micro-scratches on the visor scatter the ambient glow across shadowed cheekbones. Ambient audio captures rhythmic, muffled rebreather inhalations against a deep pressurized drone and faint radio hiss."
},
"_meta": {
"title": "Prompt"
}
},
"405:377": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"405:366",
0
],
"video_latent": [
"405:356",
0
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"405:378": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "a * b + 1",
"values.a": [
"405:362",
0
],
"values.b": [
"405:361",
0
]
},
"_meta": {
"title": "Math Expression (length)"
}
},
"405:380": {
"class_type": "TextGenerateLTX2Prompt",
"inputs": {
"clip": [
"405:393",
0
],
"max_length": 600,
"mtp": "auto",
"prompt": [
"405:376",
0
],
"sampling_mode": "on",
"sampling_mode.min_p": 0.05,
"sampling_mode.presence_penalty": 0,
"sampling_mode.repetition_penalty": 1.15,
"sampling_mode.seed": 0,
"sampling_mode.temperature": 0.7,
"sampling_mode.top_k": 64,
"sampling_mode.top_p": 0.95,
"thinking": False,
"use_default_template": True
},
"_meta": {
"title": "Generate LTX2 Prompt"
}
},
"405:381": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"405:382",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"405:382": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"405:376",
0
],
"on_true": [
"405:380",
0
],
"switch": [
"405:383",
0
]
},
"_meta": {
"title": "If/Else Switch"
}
},
"405:383": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": True
},
"_meta": {
"title": "Boolean (Enable Prompt Enhance)"
}
},
"405:384": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "ltx-2.5-22b-distilled-transformer-comfy-int8-convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"405:385": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ltx-2.5-video-vae-bf16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"405:386": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ltx-2.5-audio-vae-bf16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"405:387": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "gemma4-12b-with-proj-ltx-2.5-comfy-int8-convrot.safetensors",
"device": "default",
"type": "ltxv"
},
"_meta": {
"title": "Load CLIP"
}
},
"405:388": {
"class_type": "LTXVDualCFGGuider",
"inputs": {
"audio_cfg": 1,
"model": [
"405:384",
0
],
"negative": [
"405:365",
1
],
"positive": [
"405:365",
0
],
"video_cfg": 1
},
"_meta": {
"title": "LTXV Dual CFG Guider"
}
},
"405:391": {
"class_type": "LTXVDualCFGGuider",
"inputs": {
"audio_cfg": 1,
"model": [
"405:384",
0
],
"negative": [
"405:365",
1
],
"positive": [
"405:365",
0
],
"video_cfg": 1
},
"_meta": {
"title": "LTXV Dual CFG Guider"
}
},
"405:393": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "gemma4_e2b_it_bf16.safetensors",
"device": "default",
"type": "ltxv"
},
"_meta": {
"title": "Load CLIP"
}
},
"405:395": {
"class_type": "ManualSigmas",
"inputs": {
"sigmas": "0.85, 0.7250, 0.4219, 0.0"
},
"_meta": {
"title": "ManualSigmas"
}
},
"405:404": {
"class_type": "ManualSigmas",
"inputs": {
"sigmas": "1.0, 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)
for output in job.get_outputs("75"):
output.to_file(output.name)試試範例
關於此工作流程
這個 ComfyUI 工作流程可將純文字提示轉換為電影感影片,採用 Lightricks 的 LTX-2.5 正式生產級擴散模型。流程核心為 LTX-2.5 文字轉影片節點(UUID: 8b4f085c-1bb3-4ecd-aeed-603a8d6d3970),可根據你的提示、解析度與生成設定合成連貫片段。ResolutionSelector 節點提供符合模型需求(32 的倍數)的寬高值,SaveVideo 節點將結果編碼為單一影片檔。流程中包含 MarkdownNote,於 ComfyUI 內提供快速提示與解析度建議。
技術上,LTX-2.5 採用 Pixel Diffusion、關鍵影格優先策略:先建立強烈視覺錨點,再於其間擴散動作,有助於維持時間一致性與電影節奏。你可透過 ResolutionSelector 與模型參數調整細節與 GPU 記憶體用量。例如,16:9 下 0.5 百萬像素為 960x544,0.3 MP 為 736x416,兩者皆適合一般顯示卡預覽。若需更高細節,可啟用節點的空間放大功能,提升解析度而不需重算動作,最後以 SaveVideo 設定目標 FPS 與檔案路徑完成。
問答
LTX-2.5 最適合 32 的倍數尺寸。ResolutionSelector 會將實用的百萬像素目標對應到有效尺寸(如 0.5 MP 16:9 → 960x544),幫助你平衡細節、速度與 VRAM,不用猜測。
模型採用 Pixel Diffusion、關鍵影格優先策略,先建立強烈視覺錨點,再於其間擴散動作,減少時間漂移並提升複雜場景的連貫性。
解析度與影格數是最大因素。建議先用較低百萬像素(0.3–0.6 MP)與短片段迭代,再逐步放大。啟用空間放大會增加記憶體用量,建議先調整動作與構圖滿意後再提升細節。
SaveVideo 會將生成片段寫入單一影片檔。你可在節點設定 FPS,以符合專案需求,確保儲存檔案與交付規格一致。
相關工作流程
- MiniMax H3
Create a video from references
- Flux
FLUX 3 影片:文字轉影片
- Flux
FLUX 3 影片:文字轉影片
- Grok
Grok: 參考生影片
- HHappyHorse Text-to-Video
HappyHorse 1.1:文字轉影片
- LTX-2, Lightricks
LTX-2 文生影片
- LTX-2.3, Lightricks
LTX-2.3: 文生影片
- MiniMax
MiniMax H3:參考生成影片
- MiniMax
MiniMax H3:文字轉影片
- 合作夥伴節點
MiniMax H3:文字轉影片
- Seedance 2.0
Seedance 2.0: 文生影片
- Seedance 2.5 Text-to-Video
Seedance 2.5:文字轉影片