Kandinsky 5.0 影片精簡版 圖生影片
一款輕量級2B模型,可根據英文和俄文提示產生高品質影片。
關於
The 'Kandinsky 5.0 Video Lite Image to Video' workflow is designed to transform static images into dynamic video sequences using the Kandinsky model. This workflow leverages a lightweight 2B model capable of generating high-quality videos from prompts in both English and Russian. It uses a series of nodes, including SaveVideo, LoadImage, and MarkdownNote, to streamline the process from image input to video output.
The workflow is particularly optimized for generating videos with dimensions of 768x512, ensuring that the width and height are divisible by 128 for optimal performance in longer sequences. This attention to detail in resolution ensures that the resulting video maintains a high visual quality while remaining computationally efficient.
Technically, this workflow operates by first loading an image using the LoadImage node. The image is then processed through the Kandinsky model, which interprets the visual data and any accompanying text prompts to create a cohesive video narrative. The SaveVideo node is used to compile the generated frames into a video file. This workflow is especially useful for artists and content creators looking to add motion to their static images, providing a seamless method to enhance visual storytelling with minimal setup.
您提供的內容
- 正在讀取工作流程
在 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({
"10": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/Kandinsky5",
"format": "mp4",
"format.codec": "h264",
"video": [
"69:66",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"11": {
"class_type": "LoadImage",
"inputs": {
"image": "crystal_flower.png"
},
"_meta": {
"title": "Load Image"
}
},
"69:53": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "kandinsky5lite_i2v_5s.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"69:54": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "hunyuan_video_vae_bf16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"69:55": {
"class_type": "DualCLIPLoader",
"inputs": {
"clip_name1": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"clip_name2": "clip_l.safetensors",
"device": "default",
"type": "kandinsky5"
},
"_meta": {
"title": "Load CLIP (Dual)"
}
},
"69:56": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"69:55",
0
],
"text": "Cinematic dynamic scene in deep blue dream haze: The camera glides slowly forward, focusing on tightly closed crystal flower buds (starlight-sparkled, translucent) that sway gently with misty currents. As the lens pans right, more closed blooms blur into pulsing bokeh; sequined leaves tremble, scattering glimmers that trail light streaks. The camera then pulls back softly, the blue tone deepening from cyan to indigo, while the buds’ subtle sway syncs with drifting mist—all motion flowing in a quiet, breath-like rhythm, wrapping the scene in immersive, glittering cinematic serenity."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"69:57": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"69:55",
0
],
"text": ""
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"69:58": {
"class_type": "ImageScale",
"inputs": {
"crop": "center",
"height": [
"69:60",
0
],
"image": [
"11",
0
],
"upscale_method": "lanczos",
"width": [
"69:59",
0
]
},
"_meta": {
"title": "Upscale Image"
}
},
"69:59": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 768
},
"_meta": {
"title": "Width"
}
},
"69:60": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 512
},
"_meta": {
"title": "Height"
}
},
"69:61": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"69:53",
0
],
"shift": 5
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"69:62": {
"class_type": "Kandinsky5ImageToVideo",
"inputs": {
"batch_size": 1,
"height": [
"69:60",
0
],
"length": 121,
"negative": [
"69:57",
0
],
"positive": [
"69:56",
0
],
"start_image": [
"69:58",
0
],
"vae": [
"69:54",
0
],
"width": [
"69:59",
0
]
},
"_meta": {
"title": "Kandinsky5ImageToVideo"
}
},
"69:63": {
"class_type": "KSampler",
"inputs": {
"cfg": 5,
"denoise": 1,
"latent_image": [
"69:62",
2
],
"model": [
"69:61",
0
],
"negative": [
"69:62",
1
],
"positive": [
"69:62",
0
],
"sampler_name": "euler_ancestral",
"scheduler": "beta",
"seed": 611409204875324,
"steps": 50
},
"_meta": {
"title": "KSampler"
}
},
"69:64": {
"class_type": "ReplaceVideoLatentFrames",
"inputs": {
"destination": [
"69:63",
0
],
"index": 0,
"source": [
"69:62",
3
]
},
"_meta": {
"title": "Replace Video Latent Frames"
}
},
"69:65": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"69:69",
0
],
"vae": [
"69:54",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"69:66": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 24,
"images": [
"69:65",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"69:69": {
"class_type": "NormalizeVideoLatentStart",
"inputs": {
"latent": [
"69:64",
0
],
"reference_frame_count": 5,
"start_frame_count": 4
},
"_meta": {
"title": "NormalizeVideoLatentStart"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
建議使用 768x512,且寬高皆為 128 的倍數,以獲得最佳效果。
本流程針對英文與俄文提示詞最佳化,其他語言可能無法達到預期效果。
流程支援 5 或 10 秒影片,依設定而定。
請確認圖像尺寸正確,並調整提示詞或模型設定以優化輸出。