AIrt MAchIne (API version)
Upload an image to generate a unique, looping AI video. The workflow uses an LLM to create prompts, employs Kling3.0 for video generation, and stitches the clips into a seamless final loop.
简介
The AIrt MAchIne workflow is designed to transform a static image into a dynamic, looping AI-generated video. This innovative process begins with an image upload, which serves as the foundation for generating a unique video sequence. The workflow leverages a Large Language Model (LLM) to create prompts that guide the video generation process, ensuring each output is distinct and creative. The Kling 3.0 model is central to video creation, providing advanced capabilities for generating high-quality, seamless video clips.
These clips are then stitched together to form a continuous loop, offering a visually engaging experience. The workflow utilizes a combination of nodes, including ImageResizeKJv2 for resizing images, GeminiNode for integrating Google's Gemini model, and VHS_VideoCombine for merging video components. This setup allows users to produce professional-quality videos with minimal input, making it a valuable tool for content creators and marketers looking to enhance their visual media with AI-driven creativity.
你需要提供
- 正在读取工作流
在 ComfyUI 中运行。 此工作流无法在本页面运行。你可以在 Comfy Cloud 中打开(已预先加载所需内容),或下载后在自己的 ComfyUI 中使用。
在 Cloud 中试用查看工作流内部
节点图的只读预览。在 Comfy Cloud 中打开或下载后即可编辑节点。
Loading the graph
Open full-size workflow preview需要自定义节点
- 正在读取工作流
通过代码使用此工作流
尽可能根据工作流图和输入自动生成代码,否则显示已保存的示例。运行代码可能产生费用,请先核对凭据和端点。
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({
"5": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 1,
"height": [
"163",
0
],
"image": [
"99:77",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"162",
0
]
},
"_meta": {
"title": "Resize Image v2"
}
},
"9": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 1,
"height": [
"163",
0
],
"image": [
"103:201",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"162",
0
]
},
"_meta": {
"title": "Resize Image v2"
}
},
"10": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Clips/MJM_AIrtMAchIne_Vid1",
"format": "auto",
"format.codec": "auto",
"video": [
"139:247",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"14": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 1,
"height": [
"163",
0
],
"image": [
"107:213",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"162",
0
]
},
"_meta": {
"title": "Resize Image v2"
}
},
"16": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Clips/MJM_AIrtMAchIne_Vid2",
"format": "auto",
"format.codec": "auto",
"video": [
"141:250",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"20": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 1,
"height": [
"163",
0
],
"image": [
"111:229",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"162",
0
]
},
"_meta": {
"title": "Resize Image v2"
}
},
"22": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Clips/MJM_AIrtMAchIne_Vid3",
"format": "auto",
"format.codec": "auto",
"video": [
"144:253",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"25": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 1,
"height": [
"163",
0
],
"image": [
"115:240",
0
],
"keep_proportion": "crop",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"162",
0
]
},
"_meta": {
"title": "Resize Image v2"
}
},
"27": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Clips/MJM_AIrtMAchIne_Vid4",
"format": "auto",
"format.codec": "auto",
"video": [
"146:256",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"33": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Clips/MJM_AIrtMAchIne_Vid5",
"format": "auto",
"format.codec": "auto",
"video": [
"148:259",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"94": {
"class_type": "LoadImage",
"inputs": {
"image": "AIrt_MAchIne_init.png"
},
"_meta": {
"title": "Load Image"
}
},
"95": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"94",
0
],
"model": "gemini-3-pro-preview",
"prompt": "write 5 prompts based on this image, I will use these in a text 2 image model. The prompts should be different, be creative. Only use the image as inspiration.\n\nI want only the prompts and nothing else. Each prompt on its own line.\n\nNo empty lines in-between the prompts:\nPrompt 1\nPrompt 2\nPrompt 3\nPrompt 4\nPrompt 5",
"seed": 121362321499456,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"100": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"99:73",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"104": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"103:200",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"108": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"107:217",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"112": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"111:226",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"116": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"115:239",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"119": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"139:247",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"120": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"141:250",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"121": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"144:253",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"122": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"146:256",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"123": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"148:259",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"126": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"119",
0
],
"images.image1": [
"120",
0
],
"images.image2": [
"121",
0
],
"images.image3": [
"122",
0
],
"images.image4": [
"123",
0
]
},
"_meta": {
"title": "Batch Images"
}
},
"131": {
"class_type": "VHS_VideoCombine",
"inputs": {
"crf": 14,
"filename_prefix": "MJM/AIrt MAchIne/Final/MJM_AIrtMAchIne",
"format": "video/h264-mp4",
"frame_rate": [
"119",
2
],
"images": [
"126",
0
],
"loop_count": 0,
"pingpong": False,
"pix_fmt": "yuv420p",
"save_metadata": True,
"save_output": True,
"trim_to_audio": False
},
"_meta": {
"title": "Video Combine 🎥🅥🅗🅢"
}
},
"152": {
"class_type": "ImpactStringSelector",
"inputs": {
"multiline": False,
"select": 0,
"strings": [
"95",
0
]
},
"_meta": {
"title": "String Selector"
}
},
"153": {
"class_type": "ImpactStringSelector",
"inputs": {
"multiline": False,
"select": 1,
"strings": [
"95",
0
]
},
"_meta": {
"title": "String Selector"
}
},
"154": {
"class_type": "ImpactStringSelector",
"inputs": {
"multiline": False,
"select": 2,
"strings": [
"95",
0
]
},
"_meta": {
"title": "String Selector"
}
},
"155": {
"class_type": "ImpactStringSelector",
"inputs": {
"multiline": False,
"select": 3,
"strings": [
"95",
0
]
},
"_meta": {
"title": "String Selector"
}
},
"156": {
"class_type": "ImpactStringSelector",
"inputs": {
"multiline": False,
"select": 4,
"strings": [
"95",
0
]
},
"_meta": {
"title": "String Selector"
}
},
"161": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Frames/MJM_AIrtMAchIne_Im1",
"images": [
"5",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"162": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1024
},
"_meta": {
"title": "Width"
}
},
"163": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1024
},
"_meta": {
"title": "Height"
}
},
"164": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Frames/MJM_AIrtMAchIne_Im2",
"images": [
"9",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"165": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Frames/MJM_AIrtMAchIne_Im3",
"images": [
"14",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"166": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Frames/MJM_AIrtMAchIne_Im4",
"images": [
"20",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"167": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "MJM/AIrt MAchIne/Frames/MJM_AIrtMAchIne_Im5",
"images": [
"25",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"168": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"95",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"169": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"152",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"171": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"153",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"172": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"154",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"173": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"155",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"174": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"156",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"175": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"139:132",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"177": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"141:249",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"178": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"144:252",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"179": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"146:255",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"180": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"148:258",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"186": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "z_image_turbo_bf16.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"187": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_3_4b.safetensors",
"device": "default",
"type": "lumina2"
},
"_meta": {
"title": "Load CLIP"
}
},
"188": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"103:196": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"103:197",
0
],
"model": [
"103:198",
0
],
"negative": [
"103:207",
0
],
"positive": [
"103:205",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 976857539749268,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"103:197": {
"class_type": "EmptySD3LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"163",
0
],
"width": [
"162",
0
]
},
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"103:198": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"186",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"103:200": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"103:196",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"103:201": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"103:202",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"103:202": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 0.2,
"latent_image": [
"103:204",
0
],
"model": [
"103:198",
0
],
"negative": [
"103:207",
0
],
"positive": [
"103:205",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 974,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"103:203": {
"class_type": "UpscaleModelLoader",
"inputs": {
"model_name": "4x-UltraSharp.safetensors"
},
"_meta": {
"title": "Load Upscale Model"
}
},
"103:204": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"103:98",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"103:205": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"187",
0
],
"text": [
"153",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"103:207": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"103:205",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"103:98": {
"class_type": "ImageUpscaleWithModelBatched",
"inputs": {
"downscale_method": "bicubic",
"downscale_ratio": 0.5,
"images": [
"103:200",
0
],
"per_batch": 1,
"precision": "bfloat16",
"upscale_model": [
"103:203",
0
]
},
"_meta": {
"title": "Image Upscale With Model Batched"
}
},
"107:208": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"107:209",
0
],
"model": [
"107:210",
0
],
"negative": [
"107:220",
0
],
"positive": [
"107:218",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 689930766561209,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"107:209": {
"class_type": "EmptySD3LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"163",
0
],
"width": [
"162",
0
]
},
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"107:210": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"186",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"107:212": {
"class_type": "ImageUpscaleWithModelBatched",
"inputs": {
"downscale_method": "bicubic",
"downscale_ratio": 0.5,
"images": [
"107:217",
0
],
"per_batch": 1,
"precision": "bfloat16",
"upscale_model": [
"107:216",
0
]
},
"_meta": {
"title": "Image Upscale With Model Batched"
}
},
"107:213": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"107:214",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"107:214": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 0.2,
"latent_image": [
"107:215",
0
],
"model": [
"107:210",
0
],
"negative": [
"107:220",
0
],
"positive": [
"107:218",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 974,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"107:215": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"107:212",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"107:216": {
"class_type": "UpscaleModelLoader",
"inputs": {
"model_name": "4x-UltraSharp.safetensors"
},
"_meta": {
"title": "Load Upscale Model"
}
},
"107:217": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"107:208",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"107:218": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"187",
0
],
"text": [
"154",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"107:220": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"107:218",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"111:221": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"111:222",
0
],
"model": [
"111:223",
0
],
"negative": [
"111:233",
0
],
"positive": [
"111:232",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 472700152594450,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"111:222": {
"class_type": "EmptySD3LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"163",
0
],
"width": [
"162",
0
]
},
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"111:223": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"186",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"111:226": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"111:221",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"111:227": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"111:230",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"111:228": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 0.2,
"latent_image": [
"111:227",
0
],
"model": [
"111:223",
0
],
"negative": [
"111:233",
0
],
"positive": [
"111:232",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 974,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"111:229": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"111:228",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"111:230": {
"class_type": "ImageUpscaleWithModelBatched",
"inputs": {
"downscale_method": "bicubic",
"downscale_ratio": 0.5,
"images": [
"111:226",
0
],
"per_batch": 1,
"precision": "bfloat16",
"upscale_model": [
"111:231",
0
]
},
"_meta": {
"title": "Image Upscale With Model Batched"
}
},
"111:231": {
"class_type": "UpscaleModelLoader",
"inputs": {
"model_name": "4x-UltraSharp.safetensors"
},
"_meta": {
"title": "Load Upscale Model"
}
},
"111:232": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"187",
0
],
"text": [
"155",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"111:233": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"111:232",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"115:234": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"115:235",
0
],
"model": [
"115:236",
0
],
"negative": [
"115:246",
0
],
"positive": [
"115:245",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 579592923870881,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"115:235": {
"class_type": "EmptySD3LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"163",
0
],
"width": [
"162",
0
]
},
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"115:236": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"186",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"115:239": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"115:234",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"115:240": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"115:241",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"115:241": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 0.2,
"latent_image": [
"115:242",
0
],
"model": [
"115:236",
0
],
"negative": [
"115:246",
0
],
"positive": [
"115:245",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 974,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"115:242": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"115:243",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"115:243": {
"class_type": "ImageUpscaleWithModelBatched",
"inputs": {
"downscale_method": "bicubic",
"downscale_ratio": 0.5,
"images": [
"115:239",
0
],
"per_batch": 1,
"precision": "bfloat16",
"upscale_model": [
"115:244",
0
]
},
"_meta": {
"title": "Image Upscale With Model Batched"
}
},
"115:244": {
"class_type": "UpscaleModelLoader",
"inputs": {
"model_name": "4x-UltraSharp.safetensors"
},
"_meta": {
"title": "Load Upscale Model"
}
},
"115:245": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"187",
0
],
"text": [
"156",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"115:246": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"115:245",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"139:132": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"139:248",
0
],
"model": "gemini-3-pro-preview",
"prompt": "Write a wild prompt for a video model that will take first and last frame. Maximize motion and go crazy. Give me the prompt and nothing else.",
"seed": 590428414540815,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"139:247": {
"class_type": "KlingFirstLastFrameNode",
"inputs": {
"duration": 3,
"end_frame": [
"9",
0
],
"first_frame": [
"5",
0
],
"generate_audio": False,
"model": "kling-v3",
"model.resolution": "1080p",
"prompt": [
"139:132",
0
],
"seed": 224701350
},
"_meta": {
"title": "Kling 3.0 First-Last-Frame to Video"
}
},
"139:248": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"5",
0
],
"image_2": [
"9",
0
],
"inputcount": 2
},
"_meta": {
"title": "Image Batch Multi"
}
},
"141:249": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"141:251",
0
],
"model": "gemini-3-pro-preview",
"prompt": "Write a wild prompt for a video model that will take first and last frame. Maximize motion and go crazy. Give me the prompt and nothing else.",
"seed": 343805015166386,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"141:250": {
"class_type": "KlingFirstLastFrameNode",
"inputs": {
"duration": 3,
"end_frame": [
"14",
0
],
"first_frame": [
"9",
0
],
"generate_audio": False,
"model": "kling-v3",
"model.resolution": "1080p",
"prompt": [
"141:249",
0
],
"seed": 277329452
},
"_meta": {
"title": "Kling 3.0 First-Last-Frame to Video"
}
},
"141:251": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"9",
0
],
"image_2": [
"14",
0
],
"inputcount": 2
},
"_meta": {
"title": "Image Batch Multi"
}
},
"144:252": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"144:254",
0
],
"model": "gemini-3-pro-preview",
"prompt": "Write a wild prompt for a video model that will take first and last frame. Maximize motion and go crazy. Give me the prompt and nothing else.",
"seed": 152300153944343,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"144:253": {
"class_type": "KlingFirstLastFrameNode",
"inputs": {
"duration": 3,
"end_frame": [
"20",
0
],
"first_frame": [
"14",
0
],
"generate_audio": False,
"model": "kling-v3",
"model.resolution": "1080p",
"prompt": [
"144:252",
0
],
"seed": 1510265499
},
"_meta": {
"title": "Kling 3.0 First-Last-Frame to Video"
}
},
"144:254": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"14",
0
],
"image_2": [
"20",
0
],
"inputcount": 2
},
"_meta": {
"title": "Image Batch Multi"
}
},
"146:255": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"146:257",
0
],
"model": "gemini-3-pro-preview",
"prompt": "Write a wild prompt for a video model that will take first and last frame. Maximize motion and go crazy. Give me the prompt and nothing else.",
"seed": 27701164034917,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"146:256": {
"class_type": "KlingFirstLastFrameNode",
"inputs": {
"duration": 3,
"end_frame": [
"25",
0
],
"first_frame": [
"20",
0
],
"generate_audio": False,
"model": "kling-v3",
"model.resolution": "1080p",
"prompt": [
"146:255",
0
],
"seed": 1843562002
},
"_meta": {
"title": "Kling 3.0 First-Last-Frame to Video"
}
},
"146:257": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"20",
0
],
"image_2": [
"25",
0
],
"inputcount": 2
},
"_meta": {
"title": "Image Batch Multi"
}
},
"148:140": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"25",
0
],
"image_2": [
"5",
0
],
"inputcount": 2
},
"_meta": {
"title": "Image Batch Multi"
}
},
"148:258": {
"class_type": "GeminiNode",
"inputs": {
"images": [
"148:140",
0
],
"model": "gemini-3-pro-preview",
"prompt": "Write a wild prompt for a video model that will take first and last frame. Maximize motion and go crazy. Give me the prompt and nothing else.",
"seed": 932797822206607,
"system_prompt": ""
},
"_meta": {
"title": "Google Gemini"
}
},
"148:259": {
"class_type": "KlingFirstLastFrameNode",
"inputs": {
"duration": 3,
"end_frame": [
"5",
0
],
"first_frame": [
"25",
0
],
"generate_audio": False,
"model": "kling-v3",
"model.resolution": "1080p",
"prompt": [
"148:258",
0
],
"seed": 1821078558
},
"_meta": {
"title": "Kling 3.0 First-Last-Frame to Video"
}
},
"99:101": {
"class_type": "UpscaleModelLoader",
"inputs": {
"model_name": "4x-UltraSharp.safetensors"
},
"_meta": {
"title": "Load Upscale Model"
}
},
"99:194": {
"class_type": "ImageUpscaleWithModelBatched",
"inputs": {
"downscale_method": "bicubic",
"downscale_ratio": 0.5,
"images": [
"99:73",
0
],
"per_batch": 1,
"precision": "bfloat16",
"upscale_model": [
"99:101",
0
]
},
"_meta": {
"title": "Image Upscale With Model Batched"
}
},
"99:195": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 0.2,
"latent_image": [
"99:97",
0
],
"model": [
"99:69",
0
],
"negative": [
"99:70",
0
],
"positive": [
"99:72",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 974,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"99:66": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"99:79",
0
],
"model": [
"99:69",
0
],
"negative": [
"99:70",
0
],
"positive": [
"99:72",
0
],
"sampler_name": "res_multistep",
"scheduler": "simple",
"seed": 251301300660602,
"steps": 9
},
"_meta": {
"title": "KSampler"
}
},
"99:69": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"186",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"99:70": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"99:72",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"99:72": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"187",
0
],
"text": [
"152",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"99:73": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"99:66",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"99:77": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"99:195",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"99:79": {
"class_type": "EmptySD3LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"163",
0
],
"width": [
"162",
0
]
},
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"99:97": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"99:194",
0
],
"vae": [
"188",
0
]
},
"_meta": {
"title": "VAE Encode"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)常见问答
High-resolution images with clear subjects tend to produce the best results, as they provide more detail for the AI models to work with.
Yes, the workflow includes a prompt generator that uses an LLM, which can be adjusted for more tailored video outputs.
Yes, you can bypass the save frames and save videos groups to output only the final combined video.
While the workflow can run locally, using a machine with a good GPU will enhance performance, especially when handling high-resolution images and video generation.