From 011dfdf9f22d5d77563cdef02896d7faa2cc67b8 Mon Sep 17 00:00:00 2001 From: Tuo He Date: Thu, 5 Dec 2024 20:30:14 +0000 Subject: [PATCH] i2v change from image url to base64 coding --- py/haiper_api_node.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/py/haiper_api_node.py b/py/haiper_api_node.py index b219da4..d00d08d 100644 --- a/py/haiper_api_node.py +++ b/py/haiper_api_node.py @@ -45,7 +45,7 @@ class I2VPipelineNode: return { "required": { "prompt": ("STRING", {"default": "add prompt here", "display": "text"}), - "source_image": ("STRING", {"default": "add source image url here", "display": "text"}), + "source_image": ("IMAGE",), }, "optional": { "duration": ("INT", {"default": 6, "min": 1, "max": 6, "step": 1, "display": "number"}), @@ -70,6 +70,8 @@ class I2VPipelineNode: os.makedirs(directory, exist_ok=True) output_path = os.path.join(directory, "output-i2v.mp4") + source_image = image2base64(source_image[0]) + # Use the user-defined prompt instead of a hardcoded prompt run_status = get_video_by_i2v_pipeline(prompt, source_image, duration, seed, resolution, is_public, is_enable_prompt_enhancer, guidance_scale, output_path)