إدخال صورة واحدة Split Stack - Nano Banana 2 + Kling 3.0
ارفع صورة إدخال واحدة وأنشئ 5 زوايا بديلة لاستخدامها كإطارات بدء مع Kling 3.0. يتم تكديس كل فيديو أفقيًا في فيديو نهائي بنسبة 9x16.
حول
يأخذ سير العمل التعليمي هذا في ComfyUI صورة مرجعية واحدة ويولّد خمس زوايا كاميرا بديلة لاستخدامها كإطارات بدء لـ Kling 3.0 من صورة إلى فيديو. تقوم مجموعة من عُقَد الأدوات (بما فيها Reroute وPrimitiveNode) بتفريع إدخالك من LoadImage إلى خمس مسارات، حيث تنتج مجموعة توليد الزوايا المُهيأة مسبقًا "Nano Banana 2" وجهات نظر متنوعة للموضوع نفسه. يتم حفظ كل إطار بدء عبر SaveImage لتتمكن من التحقق من التأطير وسلامة الموضوع قبل توليد الفيديو.
بعد ذلك، تُرسل الإطارات الخمسة إلى KlingVideoNode لإنشاء مقاطع حركة قصيرة موجّهة بمطالبتك (مثل: دوران، تحريك أفقي، دولي). وأخيرًا، تُرصّ المقاطع داخل مخرج واحد عمودي باستخدام CreateVideo ثم تُحفظ عبر SaveVideo. يستخدم المكدّس تخطيط شريط أفقي داخل لوحة 9:16، بحيث يمكنك مقارنة الزوايا الخمس في فيديو واحد قابل للمشاركة. يمكن لعقدة GeminiImage2Node (اختياريًا) توليد وصف تلقائي للصورة لإثراء مطالبة الحركة؛ وإن لم تُستخدم، يعود سير العمل إلى نص يدوي من PrimitiveNode. هذا الإعداد عملي عندما تحتاج إلى بدايات متسقة ومتعددة الزوايا لـ Kling 3.0 دون إعداد تنويعات منفصلة يدويًا.
ما تقدّمه
- جارٍ قراءة سير العمل
يعمل في ComfyUI. لا يمكن تشغيل سير العمل هذا على هذه الصفحة. افتحه في Comfy Cloud مع تحميل كل شيء، أو نزّله لاستخدامه في ComfyUI الخاص بك.
جرّبه في Cloudداخل سير العمل
معاينة للقراءة فقط لرسم العقد البياني. افتحه في Comfy Cloud أو نزّله لتعديل العقد.
Loading the graph
Open full-size workflow preview- المؤلف
- Rob
يتطلب عُقدًا مخصصة
- جارٍ قراءة سير العمل
استخدم سير العمل هذا من خلال التعليمات البرمجية
يتم إنشاؤه من مخطط سير العمل والمدخلات عندما يكون ذلك ممكنًا؛ وإلا فتُعرض الأمثلة المخزنة. راجع بيانات الاعتماد ونقاط النهاية قبل تشغيل التعليمات البرمجية، إذ قد تترتب عليها رسوم.
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({
"41": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"758": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 24,
"images": [
"1222:1219",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"759": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/splitstack_final",
"format": "auto",
"format.codec": "auto",
"video": [
"758",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"1189": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"41",
0
],
"model": "Nano Banana 2 (Gemini 3.1 Flash Image)",
"prompt": "Wide shot, the subject is in view",
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 0,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"1192": {
"class_type": "KlingVideoNode",
"inputs": {
"generate_audio": False,
"model": "kling-v3",
"model.aspect_ratio": "16:9",
"model.resolution": "720p",
"multi_shot": "disabled",
"multi_shot.duration": 8,
"multi_shot.negative_prompt": "",
"multi_shot.prompt": "Static camera, the subject moves across the shot",
"seed": 484688321,
"start_frame": [
"1189",
0
]
},
"_meta": {
"title": "Kling 3.0 Video"
}
},
"1196": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/stack1_kling",
"format": "auto",
"format.codec": "auto",
"video": [
"1192",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"1200": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"41",
0
],
"model": "Nano Banana 2 (Gemini 3.1 Flash Image)",
"prompt": "Extreme close up on the subjects eye",
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 995219765575705,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"1201": {
"class_type": "KlingVideoNode",
"inputs": {
"generate_audio": False,
"model": "kling-v3",
"model.aspect_ratio": "16:9",
"model.resolution": "720p",
"multi_shot": "disabled",
"multi_shot.duration": 8,
"multi_shot.negative_prompt": "",
"multi_shot.prompt": "Dolly in on the subjects eye, extreme detail",
"seed": 947661511,
"start_frame": [
"1200",
0
]
},
"_meta": {
"title": "Kling 3.0 Video"
}
},
"1202": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/stack2_kling",
"format": "auto",
"format.codec": "auto",
"video": [
"1201",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"1208": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"41",
0
],
"model": "Nano Banana 2 (Gemini 3.1 Flash Image)",
"prompt": "Side profile of the subject",
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 451280254241378,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"1209": {
"class_type": "KlingVideoNode",
"inputs": {
"generate_audio": False,
"model": "kling-v3",
"model.aspect_ratio": "16:9",
"model.resolution": "720p",
"multi_shot": "disabled",
"multi_shot.duration": 8,
"multi_shot.negative_prompt": "",
"multi_shot.prompt": "The camera pans right",
"seed": 1237402778,
"start_frame": [
"1208",
0
]
},
"_meta": {
"title": "Kling 3.0 Video"
}
},
"1210": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/stack3_kling",
"format": "auto",
"format.codec": "auto",
"video": [
"1209",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"1216": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"41",
0
],
"model": "Nano Banana 2 (Gemini 3.1 Flash Image)",
"prompt": "Medium shot of the subject",
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 1064378156241404,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"1217": {
"class_type": "KlingVideoNode",
"inputs": {
"generate_audio": False,
"model": "kling-v3",
"model.aspect_ratio": "16:9",
"model.resolution": "720p",
"multi_shot": "disabled",
"multi_shot.duration": 8,
"multi_shot.negative_prompt": "",
"multi_shot.prompt": "The camera dollies out ",
"seed": 1618448800,
"start_frame": [
"1216",
0
]
},
"_meta": {
"title": "Kling 3.0 Video"
}
},
"1218": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/stack4_kling",
"format": "auto",
"format.codec": "auto",
"video": [
"1217",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"1224": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "auto",
"images": [
"41",
0
],
"model": "Nano Banana 2 (Gemini 3.1 Flash Image)",
"prompt": "Overhead aerial drone shot, looking down from a top perspective of the subject",
"resolution": "2K",
"response_modalities": "IMAGE+TEXT",
"seed": 540450878401556,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"1225": {
"class_type": "KlingVideoNode",
"inputs": {
"generate_audio": False,
"model": "kling-v3",
"model.aspect_ratio": "16:9",
"model.resolution": "720p",
"multi_shot": "disabled",
"multi_shot.duration": 8,
"multi_shot.negative_prompt": "",
"multi_shot.prompt": "Dolly out and orbit as the subject remains static.",
"seed": 1154249775,
"start_frame": [
"1224",
0
]
},
"_meta": {
"title": "Kling 3.0 Video"
}
},
"1226": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/stack5_kling",
"format": "auto",
"format.codec": "auto",
"video": [
"1225",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"1228": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "stack1_nb",
"images": [
"1189",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"1229": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "stack2_nb",
"images": [
"1200",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"1231": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "stack3_nb",
"images": [
"1208",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"1233": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "stack4_nb",
"images": [
"1216",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"1235": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "stack5_nb",
"images": [
"1224",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"1206:1203": {
"class_type": "ImageStitch",
"inputs": {
"direction": "down",
"image1": [
"927:912",
0
],
"image2": [
"1206:1205",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"1206:1204": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"1209",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"1206:1205": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": 384,
"image": [
"1206:1204",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": 1080
},
"_meta": {
"title": "Resize Image v2"
}
},
"1214:1211": {
"class_type": "ImageStitch",
"inputs": {
"direction": "down",
"image1": [
"1206:1203",
0
],
"image2": [
"1214:1213",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"1214:1212": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"1217",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"1214:1213": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": 384,
"image": [
"1214:1212",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": 1080
},
"_meta": {
"title": "Resize Image v2"
}
},
"1222:1219": {
"class_type": "ImageStitch",
"inputs": {
"direction": "down",
"image1": [
"1214:1211",
0
],
"image2": [
"1222:1221",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"1222:1220": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"1225",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"1222:1221": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": 384,
"image": [
"1222:1220",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": 1080
},
"_meta": {
"title": "Resize Image v2"
}
},
"925:1197": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": 384,
"image": [
"925:903",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": 1080
},
"_meta": {
"title": "Resize Image v2"
}
},
"925:903": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"1192",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"927:1198": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": 384,
"image": [
"927:904",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": 1080
},
"_meta": {
"title": "Resize Image v2"
}
},
"927:904": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"1201",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"927:912": {
"class_type": "ImageStitch",
"inputs": {
"direction": "down",
"image1": [
"925:1197",
0
],
"image2": [
"927:1198",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
}
})
# Replace each example.com URL with a public URL of your file.
workflow.set_input("41", "image", client.assets.from_url("https://example.com/replace-with-a-url/image"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)الأسئلة والأجوبة
نعم. يتطلب KlingVideoNode بيانات اعتماد صالحة. أدخل مفتاح API أو رمز الجلسة في إعدادات العقدة (أو في البيئة، إن كان التثبيت لديك يدعم ذلك) قبل تشغيل مرحلة الفيديو.
إنها مجموعة توليد زوايا مُهيأة مسبقًا تأخذ صورة إدخال واحدة وتنتج خمس وجهات نظر بديلة لاستخدامها كإطارات بدء لـ Kling 3.0. يساعدك هذا على معاينة زوايا مختلفة دون إعداد مدخلات منفصلة يدويًا.
نعم. تم إعداد سير العمل لخمس مسارات افتراضيًا. يمكنك تكرار مسار أو حذفه بعد تفريع Reroute، ثم تحديث مدخلات الرص/التكديس الداخلة إلى CreateVideo بحيث يطابق التركيب العدد الجديد. عناصر تحكم تباعد الزوايا (إن كانت مكشوفة) موجودة داخل مجموعة Nano Banana 2.
يقوم المُركِّب برص مخرجات Kling الخمسة داخل لوحة عمودية لتناسب المشاهدة على الهاتف/المنصات الاجتماعية. إذا كنت تفضل العرض الأفقي، غيّر نسبة الأبعاد/الحجم في عقدة CreateVideo (تتضمن إعدادات المؤلف 720p/2K/16:9). تأكد من أن كل الفروع تغذي المُركّب بنفس الدقة.