diff --git a/tab_batch_ng.py b/tab_batch_ng.py index 69ab195..a936fea 100644 --- a/tab_batch_ng.py +++ b/tab_batch_ng.py @@ -314,8 +314,8 @@ def render_batch_processor(state: AppState): 'lora 3 high', 'lora 3 high strength', 'lora 3 low', 'lora 3 low strength'] standard_keys = { 'name', 'mode', 'general_prompt', 'general_negative', 'current_prompt', 'negative', 'prompt', - 'seed', 'cfg', 'camera', 'flf', KEY_SEQUENCE_NUMBER, - 'frame_to_skip', 'end_frame', 'logic index', 'transition', 'vace_length', + 'seed', 'camera', KEY_SEQUENCE_NUMBER, + 'frame_to_skip', 'logic index', 'transition', 'vace_length', 'input_a_frames', 'input_b_frames', 'reference switch', 'vace schedule', 'start frame path', 'start frame strength', 'middle frame path', 'middle frame strength', @@ -610,13 +610,7 @@ def _render_sequence_card(i, seq, batch_list, data, file_path, state, ui.button(icon='casino', on_click=randomize_seed).props('flat') - # CFG - dict_number('CFG', seq, 'cfg', default=DEFAULTS['cfg'], - step=0.5, format='%.1f').props('outlined').classes('w-full') - dict_input(ui.input, 'Camera', seq, 'camera').props('outlined').classes('w-full') - dict_input(ui.input, 'FLF', seq, 'flf').props('outlined').classes('w-full') - ef_input = dict_number('End Frame', seq, 'end_frame').props('outlined').classes('w-full') seq.setdefault('logic index', 0) li_input = dict_number('Logic Index', seq, 'logic index').props('outlined readonly').classes('w-full') with li_input: diff --git a/tab_timeline_ng.py b/tab_timeline_ng.py index 9c48d85..7f3d072 100644 --- a/tab_timeline_ng.py +++ b/tab_timeline_ng.py @@ -577,7 +577,6 @@ def _render_preview_fields(item_data: dict): with ui.row().classes('w-full q-gutter-md'): ui.input('Camera', value=str(item_data.get('camera', 'static'))).props('readonly outlined') - ui.input('FLF', value=str(item_data.get('flf', '0.0'))).props('readonly outlined') ui.input('Seed', value=str(item_data.get('seed', '-1'))).props('readonly outlined') with ui.expansion('LoRA Configuration'): @@ -617,7 +616,7 @@ def _render_preview_fields(item_data: dict): known_keys = { 'sequence_number', 'general_prompt', 'general_negative', 'current_prompt', 'prompt', - 'negative', 'camera', 'flf', 'seed', 'resolutions', + 'negative', 'camera', 'seed', 'resolutions', 'frame_to_skip', 'vace schedule', 'video file path', 'middle frame path', 'end frame path', 'start frame path', 'logic index', } diff --git a/utils.py b/utils.py index b9f558c..831cf6f 100644 --- a/utils.py +++ b/utils.py @@ -28,16 +28,13 @@ DEFAULTS = { "current_prompt": "", "negative": "", "seed": -1, - "cfg": 1.5, # --- Settings --- "mode": 0, "camera": "static", - "flf": 0.0, # --- I2V / VACE Specifics --- "frame_to_skip": 81, - "end_frame": 0, "logic index": 0, "transition": "1-2", "vace_length": 49, @@ -154,6 +151,17 @@ def save_snippets(snippets): json.dump(snippets, f, indent=4) os.replace(tmp, SNIPPETS_FILE) +_REMOVED_KEYS = {"cfg", "flf", "end_frame"} + +def _migrate_remove_keys(data: dict) -> None: + """Drop keys that have been removed from the schema.""" + for item in data.get(KEY_BATCH_DATA, []): + if not isinstance(item, dict): + continue + for k in _REMOVED_KEYS: + item.pop(k, None) + + def _migrate_key_renames(data: dict) -> None: """Rename legacy keys to their current names.""" for item in data.get(KEY_BATCH_DATA, []): @@ -225,6 +233,7 @@ def load_json(path: str | Path) -> tuple[dict[str, Any], float]: with open(path, 'r') as f: data = json.load(f) t1 = time.time() + _migrate_remove_keys(data) _migrate_key_renames(data) _migrate_lora_keys(data) t2 = time.time()