Skip to content
Python

fixed ltx2 small ui glitches

DeepBeepMeep1df4e36efbde
diff --git a/defaults/ltx2_19B.json b/defaults/ltx2_19B.json
index 99cf5f3..6128706 100644
--- a/defaults/ltx2_19B.json
+++ b/defaults/ltx2_19B.json
@@ -1,6 +1,6 @@
{
"model": {
- "name": "LTX-2 19B Dev",
+ "name": "LTX-2 Dev 19B",
"architecture": "ltx2_19B",
"description": "LTX-2 generates video up to 20s with an audio soundtrack. Supports start/end keyframes and sliding-window continuation.",
"URLs": [
diff --git a/models/ltx2/ltx2_handler.py b/models/ltx2/ltx2_handler.py
index 69f62a4..2258fd8 100644
--- a/models/ltx2/ltx2_handler.py
+++ b/models/ltx2/ltx2_handler.py
@@ -62,7 +62,7 @@ class family_handler:
{
"lock_inference_steps": True,
"no_negative_prompt": True,
- "guidance_max_phases": 1,
+ "guidance_max_phases": 0,
}
)
else:
diff --git a/models/ltx2/ltx_pipelines/distilled.py b/models/ltx2/ltx_pipelines/distilled.py
index f1b76c1..d5f28ee 100644
--- a/models/ltx2/ltx_pipelines/distilled.py
+++ b/models/ltx2/ltx_pipelines/distilled.py
@@ -120,6 +120,7 @@ class DistilledPipeline:
transformer = self.model_ledger.transformer()
bind_interrupt_check(transformer, interrupt_check)
stage_1_sigmas = torch.Tensor(DISTILLED_SIGMA_VALUES).to(self.device)
+ pass_no = 1
if loras_slists is not None:
stage_1_steps = len(stage_1_sigmas) - 1
update_loras_slists(
@@ -131,7 +132,7 @@ class DistilledPipeline:
)
if callback is not None:
- callback(-1, None, True, override_num_inference_steps=len(stage_1_sigmas) - 1, pass_no=1)
+ callback(-1, None, True, override_num_inference_steps=len(stage_1_sigmas) - 1, pass_no=pass_no)
def denoising_loop(
sigmas: torch.Tensor,
@@ -153,7 +154,7 @@ class DistilledPipeline:
interrupt_check=interrupt_check,
callback=callback,
preview_tools=preview_tools,
- pass_no=1,
+ pass_no=pass_no,
)
stage_1_output_shape = VideoPixelShape(
@@ -197,6 +198,7 @@ class DistilledPipeline:
cleanup_memory()
stage_2_sigmas = torch.Tensor(STAGE_2_DISTILLED_SIGMA_VALUES).to(self.device)
+ pass_no = 2
if loras_slists is not None:
stage_2_steps = len(stage_2_sigmas) - 1
update_loras_slists(
@@ -207,7 +209,7 @@ class DistilledPipeline:
phase_switch_step2=stage_2_steps,
)
if callback is not None:
- callback(-1, None, True, override_num_inference_steps=len(stage_2_sigmas) - 1, pass_no=2)
+ callback(-1, None, True, override_num_inference_steps=len(stage_2_sigmas) - 1, pass_no=pass_no)
stage_2_output_shape = VideoPixelShape(batch=1, frames=num_frames, width=width, height=height, fps=frame_rate)
stage_2_conditionings = image_conditionings_by_replacing_latent(
images=images,
diff --git a/wgp.py b/wgp.py
index afdcd57..310f50d 100644
--- a/wgp.py
+++ b/wgp.py
@@ -8578,9 +8578,10 @@ def get_max_frames(nb):
def change_guidance_phases(state, guidance_phases):
model_type = get_state_model_type(state)
model_def = get_model_def(model_type)
+ virtual_higher_phases = model_def.get("virtual_higher_phases", False)
multiple_submodels = model_def.get("multiple_submodels", False)
label ="Phase 1-2" if guidance_phases ==3 else ( "Model / Guidance Switch Threshold" if multiple_submodels else "Guidance Switch Threshold" )
- return gr.update(visible= guidance_phases >=3 and multiple_submodels) , gr.update(visible= guidance_phases >=2), gr.update(visible= guidance_phases >=2, label = label), gr.update(visible= guidance_phases >=3), gr.update(visible= guidance_phases >=2), gr.update(visible= guidance_phases >=3)
+ return gr.update(visible= guidance_phases >=3 and multiple_submodels) , gr.update(visible= guidance_phases >=2 and not virtual_higher_phases), gr.update(visible= guidance_phases >=2, label = label), gr.update(visible= guidance_phases >=3), gr.update(visible= guidance_phases >=2 and not virtual_higher_phases), gr.update(visible= guidance_phases >=3 and not virtual_higher_phases)
memory_profile_choices= [ ("Profile 1, HighRAM_HighVRAM: at least 64 GB of RAM and 24 GB of VRAM, the fastest for short videos with a RTX 3090 / RTX 4090", 1),