水豚:圖生影片
上傳一張圖片並提供文字指令。產生一個新影片,其中輸入內容會根據您的指令進行編輯,同時保持結構和時間連貫性。
關於
「Capybara:以圖生影」工作流程可根據使用者提供的文字指令,將靜態圖像轉換為動態影片。此流程運用 Capybara 模型,能在引入指定變化的同時,維持原圖結構與時間連貫性。流程從『LoadImage』節點匯入原始圖像開始,核心轉換由 Capybara 模型節點(4f4ddf39-1508-4d34-a35c-ff10e6ce995b)負責,根據文字指令逐格編輯圖像,產生流暢的影片輸出。最後,『SaveVideo』節點將這些畫格合成為完整影片檔。
此流程特別適合內容創作者與數位藝術家,能將靜態圖像依主題或風格變化動畫化。透過保留原圖結構,確保影片忠於素材本身,時間連貫性則避免畫格間突兀轉換。Capybara 模型支援多種解析度與長寬比,詳見解析度設定表,讓此工具適用於不同平台與顯示需求。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
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({
"114": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video/ComfyUI",
"format": "auto",
"format.codec": "auto",
"video": [
"103:113",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"126": {
"class_type": "LoadImage",
"inputs": {
"image": "joy_snap.png"
},
"_meta": {
"title": "Load Image"
}
},
"103:10": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "hunyuanvideo15_vae_fp16.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"103:11": {
"class_type": "DualCLIPLoader",
"inputs": {
"clip_name1": "qwen_2.5_vl_7b.safetensors",
"clip_name2": "byt5_small_glyphxl_fp16.safetensors",
"device": "default",
"type": "hunyuan_video_15"
},
"_meta": {
"title": "Load CLIP (Dual)"
}
},
"103:113": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 24,
"images": [
"103:8",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"103:115": {
"class_type": "HunyuanVideo15ImageToVideo",
"inputs": {
"batch_size": 1,
"clip_vision_output": [
"103:119",
0
],
"height": [
"103:122",
0
],
"length": 81,
"negative": [
"103:93",
0
],
"positive": [
"103:44",
0
],
"start_image": [
"103:118",
0
],
"vae": [
"103:10",
0
],
"width": [
"103:121",
0
]
},
"_meta": {
"title": "HunyuanVideo15ImageToVideo"
}
},
"103:117": {
"class_type": "CLIPVisionLoader",
"inputs": {
"clip_name": "sigclip_vision_patch14_384.safetensors"
},
"_meta": {
"title": "Load CLIP Vision"
}
},
"103:118": {
"class_type": "ResizeAndPadImage",
"inputs": {
"image": [
"126",
0
],
"interpolation": "area",
"padding_color": "white",
"target_height": [
"103:122",
0
],
"target_width": [
"103:121",
0
]
},
"_meta": {
"title": "Resize And Pad Image"
}
},
"103:119": {
"class_type": "CLIPVisionEncode",
"inputs": {
"clip_vision": [
"103:117",
0
],
"crop": "center",
"image": [
"126",
0
]
},
"_meta": {
"title": "CLIP Vision Encode"
}
},
"103:12": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "capybara_v0.1.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"103:121": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 640
},
"_meta": {
"title": "Width"
}
},
"103:122": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 640
},
"_meta": {
"title": "Height"
}
},
"103:13": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"103:91",
0
],
"latent_image": [
"103:115",
2
],
"noise": [
"103:25",
0
],
"sampler": [
"103:16",
0
],
"sigmas": [
"103:17",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"103:16": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"103:17": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"103:12",
0
],
"scheduler": "simple",
"steps": 20
},
"_meta": {
"title": "BasicScheduler"
}
},
"103:25": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 663555858763862
},
"_meta": {
"title": "RandomNoise"
}
},
"103:44": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"103:11",
0
],
"text": "A vibrant, sunny video scene: a young man and woman sitting on a green bench on a tennis court, taking a selfie with a white smartphone. The camera starts at a low angle and slowly tilts upward, revealing the clear blue sky. The man wears a light green jacket and shorts, the woman wears a light green blazer and trousers with a red and white striped turtleneck. The woman raises one arm playfully, and they hold hands, radiating youthful energy. The overall style is bright, cinematic, with smooth, slow camera movement and warm, vivid color grading."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"103:67": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"103:12",
0
],
"shift": 7
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"103:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"103:13",
0
],
"vae": [
"103:10",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"103:91": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 6,
"model": [
"103:67",
0
],
"negative": [
"103:115",
1
],
"positive": [
"103:115",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"103:93": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"103:11",
0
],
"text": "blurry, low quality, distorted, ugly, watermark, text"
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
結構明確、元素易於根據文字指令動畫化的圖像效果最佳。建議使用高解析度圖像以提升影片品質。
Capybara 模型運用先進演算法,確保畫格間平滑過渡,在套用變化時維持原圖視覺一致性。
建議在執行流程前設定好所需解析度。如需後續調整,可用影片編輯軟體修改解析度。
請嘗試更明確、具體地撰寫文字指令,並考慮將步數提高至 50 以提升細節與品質。