LTX-2 이미지 기반 비디오 생성 (증류)
LTX-2 디스틸 모델로 정적 이미지를 동영상으로 변환, 오디오-비디오 동기화. 품질 유지하며 빠른 생성에 최적화, 자연스러운 립싱크와 동작, 생성 속도 향상.
워크플로 내부
소스 템플릿의 읽기 전용 미리보기입니다. Cloud에서 열어 노드를 살펴보고 변경할 수 있습니다.
코드에서 이 모델 호출하기
아래 요청은 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({
"75": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/LTX_2.0_i2v",
"format": "auto",
"format.codec": "auto",
"video": [
"92:97",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"98": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"102": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"98",
0
],
"resize_type": "scale dimensions",
"resize_type.crop": "center",
"resize_type.height": 720,
"resize_type.width": 1280,
"scale_method": "lanczos"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"92:1": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "ltx-2-19b-distilled.safetensors"
},
"_meta": {
"title": "Load Checkpoint"
}
},
"92:105": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"102",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"92:106": {
"class_type": "ResizeImagesByLongerEdge",
"inputs": {
"images": [
"102",
0
],
"longer_edge": 1536
},
"_meta": {
"title": "Resize Images by Longer Edge (DEPRECATED)"
}
},
"92:107": {
"class_type": "LTXVImgToVideoInplace",
"inputs": {
"bypass": False,
"image": [
"92:99",
0
],
"latent": [
"92:43",
0
],
"strength": 1,
"vae": [
"92:1",
2
]
},
"_meta": {
"title": "LTXVImgToVideoInplace"
}
},
"92:108": {
"class_type": "LTXVImgToVideoInplace",
"inputs": {
"bypass": False,
"image": [
"92:99",
0
],
"latent": [
"92:84",
0
],
"strength": 1,
"vae": [
"92:1",
2
]
},
"_meta": {
"title": "LTXVImgToVideoInplace"
}
},
"92:11": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 10
},
"_meta": {
"title": "RandomNoise"
}
},
"92:112": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"92:3",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"92:113": {
"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"
}
},
"92:22": {
"class_type": "LTXVConditioning",
"inputs": {
"frame_rate": 25,
"negative": [
"92:112",
0
],
"positive": [
"92:3",
0
]
},
"_meta": {
"title": "LTXVConditioning"
}
},
"92:3": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"92:60",
0
],
"text": "One continuous shot. The enduro rider flies through the air over the black volcanic ridge, the front wheel dipping as the bike comes down, then lands hard on the wet track. The suspension compresses, mud and grit spray out from both tyres, and he leans forward, opens the throttle and rides away along the same ridge toward the low sun breaking through the storm clouds. The camera pans smoothly to follow the bike from the side as it falls and lands, then keeps tracking it in the same setting as it speeds off, with the rain mist and golden light staying constant. Sound of the engine revving hard, the heavy thud of the landing, gravel spraying, wind gusting past the camera and distant thunder over the empty plain."
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"92:41": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"92:47",
0
],
"latent_image": [
"92:56",
0
],
"noise": [
"92:11",
0
],
"sampler": [
"92:8",
0
],
"sigmas": [
"92:113",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"92:43": {
"class_type": "EmptyLTXVLatentVideo",
"inputs": {
"batch_size": 1,
"height": [
"92:91",
1
],
"length": [
"92:62",
0
],
"width": [
"92:91",
0
]
},
"_meta": {
"title": "Empty LTXV Latent Video"
}
},
"92:47": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"92:1",
0
],
"negative": [
"92:22",
1
],
"positive": [
"92:22",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"92:48": {
"class_type": "LTXVAudioVAELoader",
"inputs": {
"ckpt_name": "ltx-2-19b-distilled.safetensors"
},
"_meta": {
"title": "Load LTXV Audio VAE"
}
},
"92:51": {
"class_type": "LTXVEmptyLatentAudio",
"inputs": {
"audio_vae": [
"92:48",
0
],
"batch_size": 1,
"frame_rate": 25,
"frames_number": [
"92:62",
0
]
},
"_meta": {
"title": "Empty LTXV Latent Audio"
}
},
"92:56": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"92:51",
0
],
"video_latent": [
"92:107",
0
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"92:60": {
"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"
}
},
"92:62": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 121
},
"_meta": {
"title": "Length"
}
},
"92:66": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "gradient_estimation"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"92:67": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 0
},
"_meta": {
"title": "RandomNoise"
}
},
"92:70": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"92:82",
0
],
"latent_image": [
"92:83",
0
],
"noise": [
"92:67",
0
],
"sampler": [
"92:66",
0
],
"sigmas": [
"92:73",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"92:73": {
"class_type": "ManualSigmas",
"inputs": {
"sigmas": "0.909375, 0.725, 0.421875, 0.0"
},
"_meta": {
"title": "ManualSigmas"
}
},
"92:76": {
"class_type": "LatentUpscaleModelLoader",
"inputs": {
"model_name": "ltx-2-spatial-upscaler-x2-1.0.safetensors"
},
"_meta": {
"title": "Load Latent Upscale Model"
}
},
"92:8": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"92:80": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"92:41",
0
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"92:81": {
"class_type": "LTXVCropGuides",
"inputs": {
"latent": [
"92:80",
0
],
"negative": [
"92:22",
1
],
"positive": [
"92:22",
0
]
},
"_meta": {
"title": "LTXVCropGuides"
}
},
"92:82": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"92:1",
0
],
"negative": [
"92:81",
1
],
"positive": [
"92:81",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"92:83": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"92:80",
1
],
"video_latent": [
"92:108",
0
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"92:84": {
"class_type": "LTXVLatentUpsampler",
"inputs": {
"samples": [
"92:81",
2
],
"upscale_model": [
"92:76",
0
],
"vae": [
"92:1",
2
]
},
"_meta": {
"title": "spatial"
}
},
"92:89": {
"class_type": "EmptyImage",
"inputs": {
"batch_size": 1,
"color": 0,
"height": [
"92:105",
1
],
"width": [
"92:105",
0
]
},
"_meta": {
"title": "Empty Image"
}
},
"92:90": {
"class_type": "ImageScaleBy",
"inputs": {
"image": [
"92:89",
0
],
"scale_by": 0.5,
"upscale_method": "lanczos"
},
"_meta": {
"title": "Upscale Image By"
}
},
"92:91": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"92:90",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"92:94": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"92:70",
1
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"92:95": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"92:94",
0
],
"vae": [
"92:1",
2
]
},
"_meta": {
"title": "VAE Decode"
}
},
"92:96": {
"class_type": "LTXVAudioVAEDecode",
"inputs": {
"audio_vae": [
"92:48",
0
],
"samples": [
"92:94",
1
]
},
"_meta": {
"title": "LTXV Audio VAE Decode"
}
},
"92:97": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"92:96",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 25,
"images": [
"92:95",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"92:99": {
"class_type": "LTXVPreprocess",
"inputs": {
"image": [
"92:106",
0
],
"img_compression": 33
},
"_meta": {
"title": "LTXV Preprocess"
}
}
})
workflow.set_input("98", "image", client.assets.from_url("https://comfy.org/catalog-media/9a3b7fb5-dad7-490b-8cd9-50f0b6cbeaed/71bdcc61-f097-4ecf-a8c8-e14fd79c59cc"))
# 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 모델을 사용해 단일 스틸 이미지를 역동적인 비디오로 변환합니다. 애니메이션 파이프라인을 Subgraph 노드(b7c2d337-c38d-4c04-922b-2d638449d13e) 안에 감싸, 로우레벨 컴포넌트를 직접 배선하는 대신 프롬프트와 파라미터에 집중할 수 있게 합니다. 소스는 LoadImage로 로드되고, ResizeImageMaskNode로 비디오에 안전한 크기로 맞춘 다음, LTX-2 Distilled Subgraph가 시간적으로 일관된 프레임을 생성하며 표현력 있는 모션과 립싱크를 만듭니다. 생성된 비디오(모델이 제공하는 경우 오디오 포함)는 SaveVideo로 디스크에 저장됩니다. 캔버스의 MarkdownNote는 인라인 가이드와 Subgraph 문서 링크를 제공해, 캡슐화된 그래프를 이해하고 커스텀할 수 있도록 돕습니다.
질문과 답변
너비 및 높이는 64로 나누어 떨어지는 값으로 설정하세요(예: 1280x768, 1920x1088). 프레임 수는 8n+1 형식(예: 9, 17, 25, 33)을 사용하세요. 유효하지 않은 값을 입력하면 Subgraph가 자동으로 가장 가까운 유효 파라미터를 선택하므로 오류는 표시되지 않지만, 결과가 입력한 정확한 숫자와 일치하지 않을 수 있습니다.
LTX-2 distilled Subgraph는 프롬프트의 오디오 섹션에 대사를 포함하면 표현력 있는 립싱크를 만들 수 있습니다. 모델이 오디오 트랙을 반환하면 SaveVideo가 이를 출력에 멀티플렉싱(mux)합니다. 모델 빌드/가중치가 오디오를 출력하지 않으면 무음 비디오가 생성됩니다(나중에 편집기에서 오디오를 추가할 수 있습니다).
더 빠른 실행을 위해 distilled 모델의 기본 720p를 사용하고, 시간에 따른 동작을 프롬프트에 정확히 명시하며, 17 또는 25 같은 중간 프레임 수를 선택하세요. 1920x1088로 업스케일링하면 시간이 더 걸립니다. 안정성을 위해 반복 작업 중에는 시드를 고정하고, 짧은 클립 하나에 과도하게 공격적인 모션 설명을 넣는 것은 피하세요.
이 워크플로는 관대하게 동작하도록 설계되어, 너비/높이는 가장 가까운 유효 값(64의 배수)으로, 프레임 수는 8n+1에 맞춰 조용히 스냅됩니다. 실행 후 Subgraph의 실제 적용 설정을 확인하고, 특정 결과가 필요하면 입력을 가장 가까운 유효 목표로 조정하세요.