LTXV 圖像到影片
從靜態圖像產生影片。
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
Loading the graph
Open full-size workflow preview此工作流程中的檔案
- 輸出
- 影片
- 作者
- ComfyUI
從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
- 您的檔案
- 由程式碼透過其 URL 上傳
需要付費 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({
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "An elderly nomad in a thick indigo wool coat with a shearling collar sits on a wet granite ledge high above a misty glacial valley at dawn. He slowly lifts his head, turns to look out over the valley, and rolls the wooden prayer beads between his weathered fingers while the wind lifts strands of his silver hair and the fleece of his collar. Below him, banks of fog drift slowly across the braided rivers and the first rose-gold light creeps over the distant snowy peaks. The camera begins close on his face and slowly pulls back and rises to reveal the vast valley stretching away behind him. Cinematic, natural motion, soft morning light, realistic detail."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"38",
0
],
"text": "low quality, worst quality, deformed, distorted, disfigured, motion smear, motion artifacts, fused fingers, bad anatomy, weird hand, ugly"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"72",
0
],
"vae": [
"44",
2
]
},
"_meta": {
"title": "VAE Decode"
}
},
"38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "t5xxl_fp16.safetensors",
"device": "default",
"type": "ltxv"
},
"_meta": {
"title": "Load CLIP"
}
},
"44": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "ltx-video-2b-v0.9.5.safetensors"
},
"_meta": {
"title": "Load Checkpoint"
}
},
"69": {
"class_type": "LTXVConditioning",
"inputs": {
"frame_rate": 25,
"negative": [
"77",
1
],
"positive": [
"77",
0
]
},
"_meta": {
"title": "LTXVConditioning"
}
},
"71": {
"class_type": "LTXVScheduler",
"inputs": {
"base_shift": 0.95,
"latent": [
"77",
2
],
"max_shift": 2.05,
"steps": 30,
"stretch": True,
"terminal": 0.1
},
"_meta": {
"title": "LTXVScheduler"
}
},
"72": {
"class_type": "SamplerCustom",
"inputs": {
"add_noise": True,
"cfg": 3,
"latent_image": [
"77",
2
],
"model": [
"44",
0
],
"negative": [
"69",
1
],
"noise_seed": 712395695050634,
"positive": [
"69",
0
],
"sampler": [
"73",
0
],
"sigmas": [
"71",
0
]
},
"_meta": {
"title": "SamplerCustom"
}
},
"73": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"77": {
"class_type": "LTXVImgToVideo",
"inputs": {
"batch_size": 1,
"height": 576,
"image": [
"78",
0
],
"length": 97,
"negative": [
"7",
0
],
"positive": [
"6",
0
],
"strength": 0.15,
"vae": [
"44",
2
],
"width": 1024
},
"_meta": {
"title": "LTXVImgToVideo"
}
},
"78": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"80": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 24,
"images": [
"8",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"81": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"80",
0
]
},
"_meta": {
"title": "Save Video"
}
}
})
workflow.set_input("78", "image", client.assets.from_url("https://comfy.org/catalog-media/1dfd11b2-7888-47c7-a563-491e97037d2a/0330a0b5-2c69-4df0-93d6-d07f707c5423"))
# 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("81"):
output.to_file(output.name)試試範例
關於此工作流程
ComfyUI 中的 LTXV 圖片轉影片工作流程用於將靜態圖片轉成動態影片序列。此工作流程使用 LTX-0.9.5 模型,專為從靜態圖片生成影片內容而最佳化。流程一開始會透過 CLIPLoader 與 CheckpointLoaderSimple 等節點載入必要模型與設定。核心轉換由 LTXVImgToVideo 節點完成,並透過 LTXVConditioning 與 LTXVScheduler 節點套用進階條件設定與排程技術。這些節點能在引入合理動作與轉場的同時,保留對來源圖片的高一致性。
技術上,此工作流程透過一系列節點來編碼文字提示詞(CLIPTextEncode)並解碼視覺資料(VAEDecode),確保輸入圖片的視覺與概念元素能準確轉譯成影片。加入自訂取樣器與 KSamplerSelect 節點可微調影片合成流程,讓使用者能控制輸出的美術風格與動作特性。此工作流程適合希望用較少操作就能讓靜態影像動起來的創作者,並在工作流程中整合 AI 影片生成相關技術。
問答
高品質、主體清楚且背景細節豐富的圖片通常能得到最好結果,因為可提供 AI 更多可用資訊。
文字提示詞很關鍵,因為它會引導 AI 生成動作與情境。越詳細、越具描述性的提示詞,通常能得到越高品質的輸出。
可以。你可以在 LTXVScheduler 節點中修改設定,以控制要生成的影格數,進而改變影片長度。
請嘗試把提示詞寫得更詳細,調整取樣設定,或改用不同的輸入圖片,以達到想要的結果。