From 70a9e8646ce38f6f4d09d7aff982b9ec81ce9919 Mon Sep 17 00:00:00 2001 From: AI_Architect Date: Sat, 15 Aug 2026 07:20:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=BE=E5=A4=A7=E7=B3=BB?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nodes_hailuo_video.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/nodes_hailuo_video.py b/nodes_hailuo_video.py index 4771909..b67c41e 100644 --- a/nodes_hailuo_video.py +++ b/nodes_hailuo_video.py @@ -34,15 +34,19 @@ class XB_HailuoH3VideoParams: "multiple": ("INT", {"default": 32, "min": 8, "max": 128, "step": 4}), "frames_display": ("STRING", {"default": "Frames: 0", "multiline": False}), "duration": ("INT", {"default": 8, "min": 4, "max": 15, "step": 1}), + "scale_factor": ("FLOAT", { + "default": 1.0, "min": 1.0, "max": 5.0, "step": 0.1, + "tooltip": "放大系数 — 接入「MiniMax H3 参考编码」的参考值放大" + }), } } - RETURN_TYPES = ("INT", "INT", "INT", "INT") - RETURN_NAMES = ("Width", "Height", "Frames", "Scale Size") + RETURN_TYPES = ("INT", "INT", "INT", "FLOAT") + RETURN_NAMES = ("Width", "Height", "Frames", "放大系数") FUNCTION = "process" CATEGORY = "XB_ToolBox/Image_Params" - def process(self, aspect_ratio, megapixels, multiple, frames_display, duration): + def process(self, aspect_ratio, megapixels, multiple, frames_display, duration, scale_factor): # ── 分辨率:官方 ResolutionSelector 公式 ── w_ratio, h_ratio = ASPECT_RATIOS.get(aspect_ratio, (16, 9)) total_pixels = megapixels * 1024 * 1024 @@ -54,4 +58,4 @@ class XB_HailuoH3VideoParams: base = max(5, round(duration * 24)) safe_len = base + (5 - (base % 17)) % 17 - return (safe_w, safe_h, safe_len, max(safe_w, safe_h)) + return (safe_w, safe_h, safe_len, scale_factor)