From 30f806de42fa70f1f786f91a33674bfa3b0c8d27 Mon Sep 17 00:00:00 2001 From: younisch96 Date: Sat, 28 Mar 2026 06:01:40 +0500 Subject: [PATCH] fix: make 360p/480p video preset labels adaptive with legacy alias support --- latent_utils.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/latent_utils.py b/latent_utils.py index e3fd691..7c653db 100644 --- a/latent_utils.py +++ b/latent_utils.py @@ -10,13 +10,19 @@ IMAGE_PRESETS = { } VIDEO_PRESETS = { - "360p (640x360)": 640, - "480p (854x480)": 854, + "360p (adaptive)": 640, + "480p (adaptive)": 854, "520p (960x520)": 960, "720p (1280x720)": 1280, "1080p (1920x1080) - Premium": 1920, } +# Backward-compat for old labels that implied fixed WxH. +LEGACY_VIDEO_PRESET_ALIASES = { + "360p (640x360)": "360p (adaptive)", + "480p (854x480)": "480p (adaptive)", +} + MULTIPLE_PROFILES = { "Auto (Image=64, Video=32)": "auto", "Flux / SDXL (64)": 64, @@ -105,6 +111,9 @@ def parse_mode_presets(mode, image_preset, video_preset, multiple_profile, resol else: image_preset = nearest_image_preset(legacy_long) + # Migrate old video preset labels to new adaptive labels. + video_preset = LEGACY_VIDEO_PRESET_ALIASES.get(video_preset, video_preset) + if image_preset not in IMAGE_PRESETS: image_preset = "1K (1024)" if video_preset not in VIDEO_PRESETS: