From a4717dfab685f90412b548635edd64621af04e9a Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Mon, 23 Feb 2026 15:26:13 +0100 Subject: [PATCH] Add vace_length field, move end_frame out of VACE settings, revert type coercion - Moved end_frame to main settings area (i2v field, not VACE) - Added vace_length (default 49) with computed output display showing vace_length + input_a + input_b - Reverted custom param type coercion (ComfyUI handles conversion) Co-Authored-By: Claude Opus 4.6 --- tab_batch.py | 12 ++++++++---- utils.py | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/tab_batch.py b/tab_batch.py index edbdc41..11e3efe 100644 --- a/tab_batch.py +++ b/tab_batch.py @@ -237,7 +237,7 @@ def render_batch_processor(data, file_path, json_files, current_dir, selected_fi } standard_keys.update(lora_keys) standard_keys.update([ - "frame_to_skip", "end_frame", "transition", + "frame_to_skip", "end_frame", "transition", "vace_length", "input_a_frames", "input_b_frames", "reference switch", "vace schedule", "reference path", "video file path", "reference image path", "flf image path" ]) @@ -379,6 +379,7 @@ def render_batch_processor(data, file_path, json_files, current_dir, selected_fi seq["camera"] = st.text_input("Camera", value=seq.get("camera", ""), key=f"{prefix}_cam") seq["flf"] = st.text_input("FLF", value=str(seq.get("flf", DEFAULTS["flf"])), key=f"{prefix}_flf") + seq["end_frame"] = st.number_input("End Frame", value=int(seq.get("end_frame", 0)), key=f"{prefix}_ef") seq["video file path"] = st.text_input("Video File Path", value=seq.get("video file path", ""), key=f"{prefix}_vid") for img_label, img_key, img_suffix in [ ("Reference Image Path", "reference image path", "rip"), @@ -415,10 +416,13 @@ def render_batch_processor(data, file_path, json_files, current_dir, selected_fi st.rerun() else: st.toast("No change to shift", icon="â„šī¸") - seq["end_frame"] = st.number_input("End Frame", value=int(seq.get("end_frame", 0)), key=f"{prefix}_ef") seq["transition"] = st.text_input("Transition", value=str(seq.get("transition", "1-2")), key=f"{prefix}_trans") seq["input_a_frames"] = st.number_input("Input A Frames", value=int(seq.get("input_a_frames", 0)), key=f"{prefix}_ia") seq["input_b_frames"] = st.number_input("Input B Frames", value=int(seq.get("input_b_frames", 0)), key=f"{prefix}_ib") + vl_col, vl_out = st.columns([3, 1]) + seq["vace_length"] = vl_col.number_input("VACE Length", value=int(seq.get("vace_length", 49)), key=f"{prefix}_vl") + total_frames = int(seq["vace_length"]) + int(seq["input_a_frames"]) + int(seq["input_b_frames"]) + vl_out.metric("Output", total_frames) seq["reference switch"] = st.number_input("Reference Switch", value=int(seq.get("reference switch", 1)), key=f"{prefix}_rsw") seq["vace schedule"] = st.number_input("VACE Schedule", value=int(seq.get("vace schedule", 1)), key=f"{prefix}_vsc") @@ -481,8 +485,8 @@ def render_batch_processor(data, file_path, json_files, current_dir, selected_fi ck1, ck2, ck3 = st.columns([1, 2, 0.5]) ck1.text_input("Key", value=k, disabled=True, key=f"{prefix}_ck_lbl_{k}", label_visibility="collapsed") val = ck2.text_input("Value", value=str(seq[k]), key=f"{prefix}_cv_{k}", label_visibility="collapsed") - seq[k] = val - + seq[k] = val + if ck3.button("đŸ—‘ī¸", key=f"{prefix}_cdel_{k}"): keys_to_remove.append(k) diff --git a/utils.py b/utils.py index a3a8faf..7b07d4f 100644 --- a/utils.py +++ b/utils.py @@ -38,6 +38,7 @@ DEFAULTS = { "frame_to_skip": 81, "end_frame": 0, "transition": "1-2", + "vace_length": 49, "vace schedule": 1, "input_a_frames": 0, "input_b_frames": 0,