dagloop5 commited on
Commit
1376439
·
verified ·
1 Parent(s): 6681ffd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -1
app.py CHANGED
@@ -61,6 +61,8 @@ LORA_FILES = {
61
  os.environ.get("H3_LORA_I_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_bf16.safetensors"),
62
  ),
63
  "loraj": (LORA_REPO, os.environ.get("H3_LORA_J_FILE", "H3_Motion_BoosterV2.safetensors")),
 
 
64
  }
65
  # Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and
66
  # the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.
@@ -76,6 +78,8 @@ LORA_LABELS = {
76
  "lorah": "Lightx2v-Minimax-H3 Turbo 768p LoRA",
77
  "lorai": "Lightx2v-Minimax-H3 Turbo 8-step LoRA",
78
  "loraj": "Motion Booster V2",
 
 
79
  }
80
  DEFAULT_LORA_1_STRENGTH = 0.0
81
  DEFAULT_LORA_A_STRENGTH = 0.0
@@ -88,6 +92,8 @@ DEFAULT_LORA_G_STRENGTH = 0.0
88
  DEFAULT_LORA_H_STRENGTH = 0.0
89
  DEFAULT_LORA_I_STRENGTH = 0.0
90
  DEFAULT_LORA_J_STRENGTH = 0.0
 
 
91
  # Per-LoRA, not global: different training pipelines can store SwiGLU's fc1 gate/value halves in either order,
92
  # and one flag can only be right for however many of the 8 files happen to agree. `lora1` (the Distilled/Turbo
93
  # LoRA) is confirmed needing the swap by InstantX's official conversion of the same lineage
@@ -773,6 +779,8 @@ def generate(
773
  lora_f_strength=DEFAULT_LORA_F_STRENGTH,
774
  lora_g_strength=DEFAULT_LORA_G_STRENGTH,
775
  lora_j_strength=DEFAULT_LORA_J_STRENGTH,
 
 
776
  maximize_gpu=False,
777
  video_shift=DEFAULT_VIDEO_SHIFT,
778
  audio_shift=DEFAULT_AUDIO_SHIFT,
@@ -875,7 +883,7 @@ def generate(
875
 
876
  # Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
877
  # needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
878
- lora_strengths = {"lora1": float(lora_1_strength), "lorah": float(lora_h_strength), "lorai": float(lora_i_strength), "loraa": float(lora_a_strength), "lorab": float(lora_b_strength), "lorac": float(lora_c_strength), "lorad": float(lora_d_strength), "lorae": float(lora_e_strength), "loraf": float(lora_f_strength), "lorag": float(lora_g_strength), "loraj": float(lora_j_strength)}
879
 
880
  progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")
881
  call = (
@@ -1244,6 +1252,20 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
1244
  step=0.05,
1245
  value=DEFAULT_LORA_J_STRENGTH,
1246
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1247
 
1248
  with gr.Accordion("Staged Denoising", open=False):
1249
  gr.Markdown(
@@ -1321,6 +1343,8 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
1321
  lora_f_strength,
1322
  lora_g_strength,
1323
  lora_j_strength,
 
 
1324
  maximize_gpu,
1325
  video_shift,
1326
  audio_shift,
 
61
  os.environ.get("H3_LORA_I_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_bf16.safetensors"),
62
  ),
63
  "loraj": (LORA_REPO, os.environ.get("H3_LORA_J_FILE", "H3_Motion_BoosterV2.safetensors")),
64
+ "lorak": (LORA_REPO, os.environ.get("H3_LORA_k_FILE", "H3_Unlocked_V2.safetensors")),
65
+ "loral": (LORA_REPO, os.environ.get("H3_LORA_l_FILE", "Ending_V1.safetensors")),
66
  }
67
  # Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and
68
  # the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.
 
78
  "lorah": "Lightx2v-Minimax-H3 Turbo 768p LoRA",
79
  "lorai": "Lightx2v-Minimax-H3 Turbo 8-step LoRA",
80
  "loraj": "Motion Booster V2",
81
+ "lorak": "H3 Unlocked LoRA",
82
+ "loral": "Ending LoRA",
83
  }
84
  DEFAULT_LORA_1_STRENGTH = 0.0
85
  DEFAULT_LORA_A_STRENGTH = 0.0
 
92
  DEFAULT_LORA_H_STRENGTH = 0.0
93
  DEFAULT_LORA_I_STRENGTH = 0.0
94
  DEFAULT_LORA_J_STRENGTH = 0.0
95
+ DEFAULT_LORA_K_STRENGTH = 0.0
96
+ DEFAULT_LORA_L_STRENGTH = 0.0
97
  # Per-LoRA, not global: different training pipelines can store SwiGLU's fc1 gate/value halves in either order,
98
  # and one flag can only be right for however many of the 8 files happen to agree. `lora1` (the Distilled/Turbo
99
  # LoRA) is confirmed needing the swap by InstantX's official conversion of the same lineage
 
779
  lora_f_strength=DEFAULT_LORA_F_STRENGTH,
780
  lora_g_strength=DEFAULT_LORA_G_STRENGTH,
781
  lora_j_strength=DEFAULT_LORA_J_STRENGTH,
782
+ lora_k_strength=DEFAULT_LORA_K_STRENGTH,
783
+ lora_l_strength=DEFAULT_LORA_L_STRENGTH,
784
  maximize_gpu=False,
785
  video_shift=DEFAULT_VIDEO_SHIFT,
786
  audio_shift=DEFAULT_AUDIO_SHIFT,
 
883
 
884
  # Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
885
  # needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
886
+ lora_strengths = {"lora1": float(lora_1_strength), "lorah": float(lora_h_strength), "lorai": float(lora_i_strength), "loraa": float(lora_a_strength), "lorab": float(lora_b_strength), "lorac": float(lora_c_strength), "lorad": float(lora_d_strength), "lorae": float(lora_e_strength), "loraf": float(lora_f_strength), "lorag": float(lora_g_strength), "loraj": float(lora_j_strength), "lorak": float(lora_k_strength), "loral": float(lora_l_strength)}
887
 
888
  progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")
889
  call = (
 
1252
  step=0.05,
1253
  value=DEFAULT_LORA_J_STRENGTH,
1254
  )
1255
+ lora_k_strength = gr.Slider(
1256
+ label="H3 Unlocked LoRA",
1257
+ minimum=0.0,
1258
+ maximum=2.0,
1259
+ step=0.05,
1260
+ value=DEFAULT_LORA_K_STRENGTH,
1261
+ )
1262
+ lora_l_strength = gr.Slider(
1263
+ label="Ending LoRA",
1264
+ minimum=0.0,
1265
+ maximum=2.0,
1266
+ step=0.05,
1267
+ value=DEFAULT_LORA_L_STRENGTH,
1268
+ )
1269
 
1270
  with gr.Accordion("Staged Denoising", open=False):
1271
  gr.Markdown(
 
1343
  lora_f_strength,
1344
  lora_g_strength,
1345
  lora_j_strength,
1346
+ lora_k_strength,
1347
+ lora_l_strength,
1348
  maximize_gpu,
1349
  video_shift,
1350
  audio_shift,