feat: add 'logic index' field mirroring end_frame

Temporary field to ease node migration. Initializes to end_frame's
value and stays in sync whenever end_frame changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 00:14:25 +02:00
parent 5bc2838b21
commit a5da8b26f4
3 changed files with 16 additions and 2 deletions
+14 -2
View File
@@ -314,7 +314,7 @@ def render_batch_processor(state: AppState):
standard_keys = {
'name', 'mode', 'general_prompt', 'general_negative', 'current_prompt', 'negative', 'prompt',
'seed', 'cfg', 'camera', 'flf', KEY_SEQUENCE_NUMBER,
'frame_to_skip', 'end_frame', 'transition', 'vace_length',
'frame_to_skip', 'end_frame', 'logic index', 'transition', 'vace_length',
'input_a_frames', 'input_b_frames', 'reference switch', 'vace schedule',
'middle frame path', 'video file path', 'start frame path', 'end frame path',
}
@@ -625,7 +625,19 @@ def _render_sequence_card(i, seq, batch_list, data, file_path, state,
dict_input(ui.input, 'Camera', seq, 'camera').props('outlined').classes('w-full')
dict_input(ui.input, 'FLF', seq, 'flf').props('outlined').classes('w-full')
dict_number('End Frame', seq, 'end_frame').props('outlined').classes('w-full')
ef_input = dict_number('End Frame', seq, 'end_frame').props('outlined').classes('w-full')
# Initialize logic index to end_frame if not yet set
if 'logic index' not in seq:
seq['logic index'] = seq.get('end_frame', 0)
li_input = dict_number('Logic Index', seq, 'logic index').props('outlined').classes('w-full')
def _mirror_to_logic_index(ef=ef_input, li=li_input, s=seq):
v = s.get('end_frame', 0)
s['logic index'] = v
li.set_value(v)
ef_input.on('blur', lambda _, m=_mirror_to_logic_index: m())
ef_input.on('update:model-value', lambda _, m=_mirror_to_logic_index: m())
dict_input(ui.input, 'Video File Path', seq, 'video file path').props(
'outlined input-style="direction: rtl"').classes('w-full')
+1
View File
@@ -619,6 +619,7 @@ def _render_preview_fields(item_data: dict):
'sequence_number', 'general_prompt', 'general_negative', 'current_prompt', 'prompt',
'negative', 'camera', 'flf', 'seed', 'resolutions',
'frame_to_skip', 'vace schedule', 'video file path', 'middle frame path', 'end frame path', 'start frame path',
'logic index',
}
# also skip lora keys
custom_keys = [
+1
View File
@@ -38,6 +38,7 @@ DEFAULTS = {
# --- I2V / VACE Specifics ---
"frame_to_skip": 81,
"end_frame": 0,
"logic index": 0,
"transition": "1-2",
"vace_length": 49,
"vace schedule": 1,