From 318a5397dc1dde3a988a6aba2c7b09f828d8806f Mon Sep 17 00:00:00 2001 From: CalamitousFelicitousness Date: Sun, 19 Apr 2026 03:37:59 +0100 Subject: [PATCH] feat(ltx): dynamic_shift checkbox and refine_strength gate Wire the dynamic_shift checkbox into _model_change so its value resets to caps.default_dynamic_shift on model swap, and narrow the refine_strength interactive gate to the 0.9.x family. On 2.x refine_strength is unused: Distilled runs a pre-baked sigma schedule, Dev runs the canonical Stage 2 distilled-LoRA schedule, neither consumes the slider. --- modules/ltx/ltx_ui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/ltx/ltx_ui.py b/modules/ltx/ltx_ui.py index a19539a4c..bd5f523e1 100644 --- a/modules/ltx/ltx_ui.py +++ b/modules/ltx/ltx_ui.py @@ -23,12 +23,13 @@ def _model_change(model_name: str): gr.update(), # guidance_scale gr.update(), # steps gr.update(), # sampler_shift + gr.update(), # dynamic_shift gr.update(interactive=False), # decode_timestep gr.update(interactive=False), # image_cond_noise_scale gr.update(visible=False), # audio_accordion ) - # distilled 2.x variants use a fixed canonical refine schedule; the strength slider is meaningless there - refine_strength_interactive = not (caps.family == '2.x' and caps.is_distilled) + # 2.x refine runs fixed canonical schedules; refine_strength only feeds 0.9.x LTXConditionPipeline. + refine_strength_interactive = caps.family == '0.9' return ( gr.update(visible=caps.supports_input_media), gr.update(visible=caps.supports_multi_condition), @@ -40,6 +41,7 @@ def _model_change(model_name: str): gr.update(value=caps.default_cfg), gr.update(value=caps.default_steps), gr.update(value=caps.default_sampler_shift), + gr.update(value=caps.default_dynamic_shift), gr.update(interactive=caps.supports_decode_timestep), gr.update(interactive=caps.supports_image_cond_noise_scale), gr.update(visible=caps.supports_audio), @@ -115,6 +117,7 @@ def create_ui(prompt, negative, styles, overrides, init_image, _init_strength, l guidance_scale, steps, sampler_shift, + dynamic_shift, decode_timestep, image_cond_noise_scale, audio_accordion,