LTX-2 تحويل وضعية إلى فيديو
توليد فيديوهات عالية الجودة من توجيه الوضعية مع توليد صوت وفيديو متزامن باستخدام LTX-2. يتميز بالتحكم الدقيق في الوضعية، والحركة التعبيرية، والأداء الفعال.
داخل سير العمل
معاينة للقراءة فقط للقالب المصدر. افتحه في Cloud لاستكشاف العُقد وإجراء التغييرات.
Loading the graph
Open full-size workflow previewاستدعِ هذا النموذج من التعليمة البرمجية الخاصة بك
يستخدم الطلب أدناه المخطط والإعدادات المُعدّة نفسها كما في 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({
"144": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"185",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"152": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": 0,
"image": [
"144",
0
],
"length": [
"168",
0
]
},
"_meta": {
"title": "Get Image from Batch"
}
},
"160": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"164": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"184",
0
],
"resize_type": "scale dimensions",
"resize_type.crop": "center",
"resize_type.height": [
"167",
0
],
"resize_type.width": [
"166",
0
],
"scale_method": "lanczos"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"165": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"160",
0
],
"resize_type": "scale dimensions",
"resize_type.crop": "center",
"resize_type.height": [
"167",
0
],
"resize_type.width": [
"166",
0
],
"scale_method": "lanczos"
},
"_meta": {
"title": "Resize Image/Mask"
}
},
"166": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1280
},
"_meta": {
"title": "Width"
}
},
"167": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 720
},
"_meta": {
"title": "Height"
}
},
"168": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 121
},
"_meta": {
"title": "Frame Count"
}
},
"169": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": False
},
"_meta": {
"title": "Ignore First Frame?"
}
},
"175": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/LTX_2.0",
"format": "auto",
"format.codec": "auto",
"video": [
"143:106",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"184": {
"class_type": "DWPreprocessor",
"inputs": {
"bbox_detector": "yolox_l.onnx",
"detect_body": "enable",
"detect_face": "disable",
"detect_hand": "enable",
"image": [
"152",
0
],
"pose_estimator": "dw-ll_ucoco_384_bs5.torchscript.pt",
"resolution": 512,
"scale_stick_for_xinsr_cn": "disable"
},
"_meta": {
"title": "DWPose Estimator"
}
},
"185": {
"class_type": "LoadVideo",
"inputs": {
"button": {
"clicked": False,
"computedDisabled": False,
"computedHeight": 24,
"label": "choose file to upload",
"last_y": 50,
"name": "upload",
"options": {
"canvasOnly": True,
"serialize": False
},
"type": "button",
"y": 50
},
"file": "UPLOADED_pose_video_FILENAME"
},
"_meta": {
"title": "Load Video"
}
},
"143:100": {
"class_type": "LatentUpscaleModelLoader",
"inputs": {
"model_name": "ltx-2-spatial-upscaler-x2-1.0.safetensors"
},
"_meta": {
"title": "Load Latent Upscale Model"
}
},
"143:101": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"143:122",
1
],
"video_latent": [
"143:151",
0
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"143:103": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "ltx-2-19b-dev-fp8.safetensors"
},
"_meta": {
"title": "Load Checkpoint"
}
},
"143:104": {
"class_type": "LTXVCropGuides",
"inputs": {
"latent": [
"143:122",
0
],
"negative": [
"143:132",
1
],
"positive": [
"143:132",
0
]
},
"_meta": {
"title": "LTXVCropGuides"
}
},
"143:105": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "ltx-2-19b-distilled-lora-384.safetensors",
"model": [
"143:134",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"143:106": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"143:139",
0
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"143:148",
0
],
"images": [
"143:144",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"143:107": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"143:108",
0
],
"latent_image": [
"143:101",
0
],
"noise": [
"143:143",
0
],
"sampler": [
"143:98",
0
],
"sigmas": [
"143:99",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"143:108": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"143:105",
0
],
"negative": [
"143:104",
1
],
"positive": [
"143:104",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"143:110": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"143:155",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"143:111": {
"class_type": "LTXVEmptyLatentAudio",
"inputs": {
"audio_vae": [
"143:96",
0
],
"batch_size": 1,
"frame_rate": [
"143:145",
0
],
"frames_number": [
"143:110",
2
]
},
"_meta": {
"title": "Empty LTXV Latent Audio"
}
},
"143:112": {
"class_type": "LTXVLatentUpsampler",
"inputs": {
"samples": [
"143:104",
2
],
"upscale_model": [
"143:100",
0
],
"vae": [
"143:103",
2
]
},
"_meta": {
"title": "spatial"
}
},
"143:113": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"143:138",
0
],
"vae": [
"143:103",
2
]
},
"_meta": {
"title": "VAE Decode"
}
},
"143:114": {
"class_type": "LTXVConditioning",
"inputs": {
"frame_rate": [
"143:148",
0
],
"negative": [
"143:119",
0
],
"positive": [
"143:124",
0
]
},
"_meta": {
"title": "LTXVConditioning"
}
},
"143:115": {
"class_type": "EmptyLTXVLatentVideo",
"inputs": {
"batch_size": 1,
"height": [
"143:110",
1
],
"length": [
"143:110",
2
],
"width": [
"143:110",
0
]
},
"_meta": {
"title": "Empty LTXV Latent Video"
}
},
"143:116": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"143:111",
0
],
"video_latent": [
"143:132",
2
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"143:119": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"143:97",
0
],
"text": "blurry, low quality, still frame, frames, watermark, overlay, titles, has blurbox, has subtitles"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"143:122": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"143:123",
0
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"143:123": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"143:93",
0
],
"latent_image": [
"143:116",
0
],
"noise": [
"143:126",
0
],
"sampler": [
"143:94",
0
],
"sigmas": [
"143:95",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"143:124": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"143:97",
0
],
"text": "In a realistic cinematic style, a lone sentinel in heavy obsidian-and-silver plate armour and a frayed charcoal mantle stands on a frozen salt flat at twilight, then begins to dance. Moving slowly and gracefully despite the armour, the sentinel floats both arms up and out to the sides, sweeps one gauntlet across the chest, steps left and right, bends into a gentle lunge, tilts the torso and raises both hands overhead before lowering them in a wave. The mantle swings with each turn and frost dust lifts from the cracked white ground. The camera holds still at full-body distance under a vast, cold overcast sky with a thin glow on the horizon. Sound: the creak and clink of metal plates, boots crunching on salt, and a low, steady wind."
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"143:126": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 0
},
"_meta": {
"title": "RandomNoise"
}
},
"143:132": {
"class_type": "LTXVAddGuide",
"inputs": {
"frame_idx": 0,
"image": [
"164",
0
],
"latent": [
"143:149",
0
],
"negative": [
"143:114",
1
],
"positive": [
"143:114",
0
],
"strength": 1,
"vae": [
"143:103",
2
]
},
"_meta": {
"title": "LTXVAddGuide"
}
},
"143:134": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "ltx-2-19b-ic-lora-pose-control.safetensors",
"model": [
"143:103",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"143:138": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"143:107",
1
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"143:139": {
"class_type": "LTXVAudioVAEDecode",
"inputs": {
"audio_vae": [
"143:96",
0
],
"samples": [
"143:138",
1
]
},
"_meta": {
"title": "LTXV Audio VAE Decode"
}
},
"143:143": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 0
},
"_meta": {
"title": "RandomNoise"
}
},
"143:144": {
"class_type": "VAEDecodeTiled",
"inputs": {
"overlap": 64,
"samples": [
"143:138",
0
],
"temporal_overlap": 8,
"temporal_size": 4096,
"tile_size": 512,
"vae": [
"143:103",
2
]
},
"_meta": {
"title": "VAE Decode (Tiled)"
}
},
"143:145": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 24
},
"_meta": {
"title": "Int"
}
},
"143:148": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 24
},
"_meta": {
"title": "Float"
}
},
"143:149": {
"class_type": "LTXVImgToVideoInplace",
"inputs": {
"bypass": [
"169",
0
],
"image": [
"165",
0
],
"latent": [
"143:115",
0
],
"strength": 1,
"vae": [
"143:103",
2
]
},
"_meta": {
"title": "LTXVImgToVideoInplace"
}
},
"143:151": {
"class_type": "LTXVImgToVideoInplace",
"inputs": {
"bypass": [
"169",
0
],
"image": [
"165",
0
],
"latent": [
"143:112",
0
],
"strength": 1,
"vae": [
"143:103",
2
]
},
"_meta": {
"title": "LTXVImgToVideoInplace"
}
},
"143:155": {
"class_type": "ImageScaleBy",
"inputs": {
"image": [
"164",
0
],
"scale_by": 0.5,
"upscale_method": "lanczos"
},
"_meta": {
"title": "Upscale Image By"
}
},
"143:93": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 3,
"model": [
"143:134",
0
],
"negative": [
"143:132",
1
],
"positive": [
"143:132",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"143:94": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"143:95": {
"class_type": "LTXVScheduler",
"inputs": {
"base_shift": 0.95,
"latent": [
"143:116",
0
],
"max_shift": 2.05,
"steps": 20,
"stretch": True,
"terminal": 0.1
},
"_meta": {
"title": "LTXVScheduler"
}
},
"143:96": {
"class_type": "LTXVAudioVAELoader",
"inputs": {
"ckpt_name": "ltx-2-19b-dev-fp8.safetensors"
},
"_meta": {
"title": "Load LTXV Audio VAE"
}
},
"143:97": {
"class_type": "LTXAVTextEncoderLoader",
"inputs": {
"ckpt_name": "ltx-2-19b-dev-fp8.safetensors",
"device": "default",
"text_encoder": "gemma_3_12B_it_fp4_mixed.safetensors"
},
"_meta": {
"title": "Load LTXV Audio Text Encoder"
}
},
"143:98": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "gradient_estimation"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"143:99": {
"class_type": "ManualSigmas",
"inputs": {
"sigmas": "0.909375, 0.725, 0.421875, 0.0"
},
"_meta": {
"title": "ManualSigmas"
}
}
})
workflow.set_input("160", "image", client.assets.from_url("https://comfy.org/catalog-media/3be01b31-4698-4186-956d-4f6daa179b8e/1043c6bb-f78c-4bc1-9ebb-49710675437e"))
workflow.set_input("185", "file", client.assets.from_url("https://comfy.org/catalog-media/145a3aa5-a96a-4a02-9110-214f6a0afedd/cb97a2bb-20eb-443d-9bb8-a024127619ca"))
# 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("175"):
output.to_file(output.name)جرّب مثالًا
حول سير العمل هذا
تم تصميم سير العمل LTX-2 Pose to Video لتحويل توجيه الوضعيات إلى محتوى فيديو عالي الجودة مع توليد متزامن للصوت والفيديو. بالاعتماد على نموذج LTX-2 من Lightricks، يوفر هذا سير العمل تحكمًا دقيقًا في الوضعية والحركة التعبيرية، ما يجعله مناسبًا لإنشاء محتوى فيديو ديناميكي. يدمج سير العمل عُقدًا متعددة مثل GetVideoComponents وPreviewImage وSaveVideo، والتي تساعد في تقسيم الفيديو إلى مكونات، ومعاينة الإطارات، وحفظ الإخراج النهائي. ومن الميزات الأساسية استخدام عُقد comfyui_controlnet_aux المخصصة، والتي تعزز دقة التحكم في الوضعيات وتعبير الحركة.
تقنيًا، يبدأ سير العمل بالمعالجة المسبقة للفيديو والصور عبر عُقد مثل LoadVideo وResizeImageMaskNode. ثم يستخدم DWPreprocessor لتنقيح إعدادات الفيديو، بما يضمن عدد إطارات ودقة مناسبة. تم تصميم سير العمل للتعامل مع دقات تصل إلى 1920x1088، لكنه يضبط افتراضيًا على 720p لزيادة الكفاءة. يجب أن يكون عدد الإطارات قابلاً للقسمة على 8 ثم إضافة 1، ما يضمن انتقالات سلسة ومزامنة صحيحة. يُعد هذا سير العمل مفيدًا للمبدعين الذين يريدون إنتاج فيديوهات بحركة مفصلة وصوت متزامن، بالاستفادة من إمكانات نموذج LTX-2 لتحقيق نتائج مناسبة للاستخدام الاحترافي.
الأسئلة والأجوبة
يجب أن تكون الدقة قابلة للقسمة على 64. الافتراضي هو 720p، لكن يمكنك استخدام حتى 1920x1088 إذا كان النظام لديك يدعم ذلك.
هذا يضمن انتقالات سلسة ومزامنة في الفيديو، ويمنع أي شوائب أو أعطال محتملة.
على الرغم من أن سير العمل فعّال، يعتمد التوليد في الوقت الفعلي على إمكانات النظام وتعقيد محتوى الفيديو.
ركز على توجيه وضعيات مفصل، وتأكد من أن إعدادات الفيديو مثل الدقة وعدد الإطارات تلتزم بمتطلبات سير العمل.
مهام سير عمل ذات صلة
- LTX-2, Lightricks
LTX-2 صورة إلى فيديو (مقطر)
- LTX-2, Lightricks
LTX-2 من اكتشاف الحواف إلى فيديو
- LTX-2, Lightricks
LTX-2 من العمق إلى فيديو
- LTX-2, Lightricks
LTX-2 نص إلى فيديو
- LTX-2, Lightricks
LTX-2 نص إلى فيديو (مقطر)
- LTX-2
LTX-2: الصوت إلى الفيديو
- LTX-2, Lightricks
LTX-2: تحويل النص إلى فيديو
- LTX-2, Lightricks
LTX-2: صورة إلى فيديو
- LTX-2
اضغط أي شيء باستخدام LTX-2 I2V وLoRA