Pika H3 Flex: First and Last Frame to Video
使用 Pika H3 Flex 在兩個靜幀之間製作動畫:第一張圖片開啟鏡頭,第二張圖片結束鏡頭,而提示詞描述兩者之間的路徑。這兩個幀被鎖定在片段的開頭和結尾,適配器以強度 1.0 運行在 int8 MiniMax H3 FL2VA 基礎模型上,使用 lcm 取樣器和 Pika 的六步 sigma...
關於
Animate between two still frames with Pika H3 Flex: the first image opens the shot and the second closes it, while the prompt describes the path between them. The two frames are locked to the start and the end of the clip, the adapter runs at strength 1.0 on the int8 MiniMax H3 FL2VA base with the lcm sampler and Pika's six-step sigma list, and the output size is taken from the first frame and snapped to a multiple of 32 automatically, so portrait sources stay portrait.
Graph: LoadImage x2 (node 147 = first frame lastP_spin_jump_hole.png, node 148 = last frame ref_popart_woman.png) -> GetImageSize -> MiniMaxH3ImageToVideo (prompt) -> UNETLoader minimax_h3_fl2va_pruned_int8_convrot + LoraLoaderModelOnly pika_h3_flex_fl2va_v1_bf16 (strength 1.0) -> SamplerCustomAdvanced (lcm, ManualSigmas 1.0 .. 0.0 in six steps) -> CreateVideo (24 fps, H3 audio VAE) -> SaveVideo. Output size comes from the first frame, rounded to a multiple of 32.
Two required image inputs plus a prompt, so the record stays download-only: `comfy workflow validate --where cloud` reports unknown_enum_value for the int8 video VAE and the FL2VA LoRA, i.e. the weights are outside the CLI's enumerated catalog, and a playground Run button cannot be claimed to work before a real cloud run.
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請下載並在 ComfyUI 中開啟。
下載工作流程工作流程內部
節點圖的唯讀預覽。請在 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({
"92": {
"class_type": "SaveVideo",
"inputs": {
"codec": "auto",
"filename_prefix": "video/Pika_H3_Flex_FL2VA",
"format": "auto",
"format.codec": "auto",
"video": [
"140:130",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"147": {
"class_type": "LoadImage",
"inputs": {
"image": "lastP_spin_jump_hole.png"
},
"_meta": {
"title": "Last frame (Picture 2)"
}
},
"148": {
"class_type": "LoadImage",
"inputs": {
"image": "ref_popart_woman.png"
},
"_meta": {
"title": "First frame"
}
},
"149": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"148",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"140:119": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "minimax_h3_video_vae_int8_convrot.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"140:120": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "minimax_h3_audio_vae_fp32.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"140:121": {
"class_type": "VAEDecodeAudio",
"inputs": {
"samples": [
"140:125",
0
],
"vae": [
"140:120",
0
]
},
"_meta": {
"title": "VAE Decode Audio"
}
},
"140:122": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"140:125",
0
],
"vae": [
"140:119",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"140:123": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "lcm"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"140:125": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"140:126",
0
],
"latent_image": [
"140:131",
1
],
"noise": [
"140:129",
0
],
"sampler": [
"140:123",
0
],
"sigmas": [
"140:143",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"140:126": {
"class_type": "BasicGuider",
"inputs": {
"conditioning": [
"140:131",
0
],
"model": [
"140:134",
0
]
},
"_meta": {
"title": "Basic Guider"
}
},
"140:127": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "minimax_h3_fl2va_pruned_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"140:128": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
"device": "default",
"type": "minimax"
},
"_meta": {
"title": "Load CLIP"
}
},
"140:129": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 915756813683825
},
"_meta": {
"title": "RandomNoise"
}
},
"140:130": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"140:121",
0
],
"bit_depth": "auto",
"chroma_subsampling": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": 24,
"images": [
"140:122",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"140:131": {
"class_type": "MiniMaxH3ImageToVideo",
"inputs": {
"clip": [
"140:128",
0
],
"first_frame": [
"148",
0
],
"height": [
"140:151",
1
],
"last_frame": [
"147",
0
],
"length": [
"140:132",
1
],
"prompt": "How the reference pictures align with the target video — Picture 1 (from Shot 1) aligns with the 0.00-second mark of the target video; Picture 2 (from Shot 1) aligns with the 5.17-second mark of the target video.\n\nintegrated_multimodal_description: [Shot 1] Editorial pop-art photography and printed-graphic hybrid: the woman and her clothing stay photographic with real skin texture, while everything printed — the sticker pizza, the stars, the halftone dots, the sticker tiles on the floor — stays flat printed card with heavy black outlines and no thickness. Flat hard frontal light, seamless process-red field, no gloss on the red. The shot begins exactly on Picture 1: tight portrait framing, red cat-eye sunglasses on her face, black and white checkerboard top, lips just touching the tip of the flat sticker pizza held at chin height, deadpan behind the dark lenses. At about half a second she bites the sticker and pulls her head back, and the red field behind her behaves like printed paper: a ragged tear opens behind her shoulders and curls at its edges. At about one and a half seconds she spins a full turn on the spot, clockwise, the sticker turning with her so its black outline draws a full circle against the red. At about two and a half seconds she jumps up through the tear toward the lens, and the camera pulls back with small amplitude at slow speed, coming to rest exactly when her raised arms fit inside the frame. At about three and a half seconds she lands facing the lens in the pose of Picture 2: arms overhead holding the sticker pizza, its bitten edge toward camera, the red cat-eye sunglasses airborne above and to her left, tumbling end over end with one lens catching the light, her face breaking into a wide open laugh. Flat yellow stars and small sticker pizza tiles populate the red field exactly as in Picture 2, and the halftone dot pattern resolves into visible print grain. The shot settles into the final composition of Picture 2 and holds, with only the sunglasses still turning in the air.\n\noverall_soundscape: A crisp papery bite, then the dry rasping tear of thick printed stock splitting and curling, one short airy whoosh for the spin, a light thump of her landing, the plastic clatter of sunglasses tumbling above her, and her open laugh arriving on the landing over a dry studio room with no reverb.\n\nnon_diegetic_music: A fast bright brass-and-clarinet figure that hits on the spin, cuts to a single sustained note through the jump, and lands on one resolved chord with her laugh.",
"vae": [
"140:119",
0
],
"width": [
"140:150",
1
]
},
"_meta": {
"title": "MiniMax H3 Image to Video"
}
},
"140:132": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "max(5, round(a * 24)) + (5 - (max(5, round(a * 24)) % 17)) % 17",
"values.a": [
"140:133",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"140:133": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 5
},
"_meta": {
"title": "Float (duration)"
}
},
"140:134": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "pika_h3_flex_fl2va_v1_bf16.safetensors",
"model": [
"140:127",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"140:143": {
"class_type": "ManualSigmas",
"inputs": {
"sigmas": "1.0, 0.972973, 0.923077, 0.8, 0.571429, 0.333333, 0.0"
},
"_meta": {
"title": "ManualSigmas"
}
},
"140:150": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "round(a/32)*32",
"values.a": [
"140:152",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"140:151": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "round(a/32)*32",
"values.a": [
"140:153",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"140:152": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"149",
0
]
},
"_meta": {
"title": "Int"
}
},
"140:153": {
"class_type": "PrimitiveInt",
"inputs": {
"value": [
"149",
1
]
},
"_meta": {
"title": "Int"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)