dagloop5 commited on
Commit
25703ab
·
verified ·
1 Parent(s): 804192c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -5
app.py CHANGED
@@ -44,19 +44,20 @@ LORA_FILES = {
44
  "lora1": (LORA_REPO, os.environ.get("H3_LORA_1_FILE", "minimax_h3_turbo_v4_step600_ema.safetensors")),
45
  "loraa": (LORA_REPO, os.environ.get("H3_LORA_A_FILE", "Mylo_lora_epoch31.safetensors")),
46
  "lorab": (LORA_REPO, os.environ.get("H3_LORA_B_FILE", "VBVR_H3_attn_only.safetensors")),
47
- "lorac": (LORA_REPO, os.environ.get("H3_LORA_C_FILE", "AIO_V2.safetensors")),
48
  "lorad": (LORA_REPO, os.environ.get("H3_LORA_D_FILE", "Furry enhancer Video H3 V2.54.safetensors")),
49
  "lorae": (LORA_REPO, os.environ.get("H3_LORA_E_FILE", "sb_H3_i2v_v1.1.safetensors")),
50
  "loraf": (LORA_REPO, os.environ.get("H3_LORA_F_FILE", "moawxx_000002000.safetensors")),
51
  "lorag": (LORA_REPO, os.environ.get("H3_LORA_G_FILE", "Mystic_MMH3-V4.safetensors")),
52
  "lorah": (
53
  os.environ.get("H3_LORA_H_REPO", "lightx2v/Minimax-h3-Turbo"),
54
- os.environ.get("H3_LORA_H_FILE", "minimax_h3_fl2v_turbo_4step_v1.1_768p_bf16.safetensors"),
55
  ),
56
  "lorai": (
57
  os.environ.get("H3_LORA_I_REPO", "lightx2v/Minimax-h3-Turbo"),
58
  os.environ.get("H3_LORA_I_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_bf16.safetensors"),
59
  ),
 
60
  }
61
  # Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and
62
  # the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.
@@ -71,6 +72,7 @@ LORA_LABELS = {
71
  "lorag": "Mystic-V4",
72
  "lorah": "Lightx2v-Minimax-H3 Turbo 768p LoRA",
73
  "lorai": "Lightx2v-Minimax-H3 Turbo 8-step LoRA",
 
74
  }
75
  DEFAULT_LORA_1_STRENGTH = 0.0
76
  DEFAULT_LORA_A_STRENGTH = 0.0
@@ -82,6 +84,7 @@ DEFAULT_LORA_F_STRENGTH = 0.0
82
  DEFAULT_LORA_G_STRENGTH = 0.0
83
  DEFAULT_LORA_H_STRENGTH = 0.0
84
  DEFAULT_LORA_I_STRENGTH = 0.0
 
85
  # Per-LoRA, not global: different training pipelines can store SwiGLU's fc1 gate/value halves in either order,
86
  # and one flag can only be right for however many of the 8 files happen to agree. `lora1` (the Distilled/Turbo
87
  # LoRA) is confirmed needing the swap by InstantX's official conversion of the same lineage
@@ -766,6 +769,7 @@ def generate(
766
  lora_e_strength=DEFAULT_LORA_E_STRENGTH,
767
  lora_f_strength=DEFAULT_LORA_F_STRENGTH,
768
  lora_g_strength=DEFAULT_LORA_G_STRENGTH,
 
769
  maximize_gpu=False,
770
  video_shift=DEFAULT_VIDEO_SHIFT,
771
  audio_shift=DEFAULT_AUDIO_SHIFT,
@@ -868,7 +872,7 @@ def generate(
868
 
869
  # Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
870
  # needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
871
- 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)}
872
 
873
  progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")
874
  call = (
@@ -1165,7 +1169,7 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
1165
  info="Video/Audio Shift = 6/3",
1166
  )
1167
  lora_h_strength = gr.Slider(
1168
- label="Lightx2v-Minimax-H3 Turbo 768p LoRA",
1169
  minimum=0.0,
1170
  maximum=2.0,
1171
  step=0.05,
@@ -1196,7 +1200,7 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
1196
  value=DEFAULT_LORA_B_STRENGTH,
1197
  )
1198
  lora_c_strength = gr.Slider(
1199
- label="HM-AIO LoRA",
1200
  minimum=0.0,
1201
  maximum=2.0,
1202
  step=0.05,
@@ -1230,6 +1234,13 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
1230
  step=0.05,
1231
  value=DEFAULT_LORA_G_STRENGTH,
1232
  )
 
 
 
 
 
 
 
1233
 
1234
  with gr.Accordion("Staged Denoising", open=False):
1235
  gr.Markdown(
@@ -1306,6 +1317,7 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
1306
  lora_e_strength,
1307
  lora_f_strength,
1308
  lora_g_strength,
 
1309
  maximize_gpu,
1310
  video_shift,
1311
  audio_shift,
 
44
  "lora1": (LORA_REPO, os.environ.get("H3_LORA_1_FILE", "minimax_h3_turbo_v4_step600_ema.safetensors")),
45
  "loraa": (LORA_REPO, os.environ.get("H3_LORA_A_FILE", "Mylo_lora_epoch31.safetensors")),
46
  "lorab": (LORA_REPO, os.environ.get("H3_LORA_B_FILE", "VBVR_H3_attn_only.safetensors")),
47
+ "lorac": (LORA_REPO, os.environ.get("H3_LORA_C_FILE", "HM-AIO-V2.5.safetensors")),
48
  "lorad": (LORA_REPO, os.environ.get("H3_LORA_D_FILE", "Furry enhancer Video H3 V2.54.safetensors")),
49
  "lorae": (LORA_REPO, os.environ.get("H3_LORA_E_FILE", "sb_H3_i2v_v1.1.safetensors")),
50
  "loraf": (LORA_REPO, os.environ.get("H3_LORA_F_FILE", "moawxx_000002000.safetensors")),
51
  "lorag": (LORA_REPO, os.environ.get("H3_LORA_G_FILE", "Mystic_MMH3-V4.safetensors")),
52
  "lorah": (
53
  os.environ.get("H3_LORA_H_REPO", "lightx2v/Minimax-h3-Turbo"),
54
+ os.environ.get("H3_LORA_H_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors"),
55
  ),
56
  "lorai": (
57
  os.environ.get("H3_LORA_I_REPO", "lightx2v/Minimax-h3-Turbo"),
58
  os.environ.get("H3_LORA_I_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_bf16.safetensors"),
59
  ),
60
+ "loraj": (LORA_REPO, os.environ.get("H3_LORA_J_FILE", "H3_Motion_BoosterV2.safetensors")),
61
  }
62
  # Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and
63
  # the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.
 
72
  "lorag": "Mystic-V4",
73
  "lorah": "Lightx2v-Minimax-H3 Turbo 768p LoRA",
74
  "lorai": "Lightx2v-Minimax-H3 Turbo 8-step LoRA",
75
+ "loraj": "Motion Booster V2",
76
  }
77
  DEFAULT_LORA_1_STRENGTH = 0.0
78
  DEFAULT_LORA_A_STRENGTH = 0.0
 
84
  DEFAULT_LORA_G_STRENGTH = 0.0
85
  DEFAULT_LORA_H_STRENGTH = 0.0
86
  DEFAULT_LORA_I_STRENGTH = 0.0
87
+ DEFAULT_LORA_J_STRENGTH = 0.0
88
  # Per-LoRA, not global: different training pipelines can store SwiGLU's fc1 gate/value halves in either order,
89
  # and one flag can only be right for however many of the 8 files happen to agree. `lora1` (the Distilled/Turbo
90
  # LoRA) is confirmed needing the swap by InstantX's official conversion of the same lineage
 
769
  lora_e_strength=DEFAULT_LORA_E_STRENGTH,
770
  lora_f_strength=DEFAULT_LORA_F_STRENGTH,
771
  lora_g_strength=DEFAULT_LORA_G_STRENGTH,
772
+ lora_j_strength=DEFAULT_LORA_J_STRENGTH,
773
  maximize_gpu=False,
774
  video_shift=DEFAULT_VIDEO_SHIFT,
775
  audio_shift=DEFAULT_AUDIO_SHIFT,
 
872
 
873
  # Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
874
  # needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
875
+ 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)}
876
 
877
  progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")
878
  call = (
 
1169
  info="Video/Audio Shift = 6/3",
1170
  )
1171
  lora_h_strength = gr.Slider(
1172
+ label="Lightx2v-Minimax-H3 Turbo 8-step 768p LoRA",
1173
  minimum=0.0,
1174
  maximum=2.0,
1175
  step=0.05,
 
1200
  value=DEFAULT_LORA_B_STRENGTH,
1201
  )
1202
  lora_c_strength = gr.Slider(
1203
+ label="HM-AIO V2.5 LoRA",
1204
  minimum=0.0,
1205
  maximum=2.0,
1206
  step=0.05,
 
1234
  step=0.05,
1235
  value=DEFAULT_LORA_G_STRENGTH,
1236
  )
1237
+ lora_j_strength = gr.Slider(
1238
+ label="H3 Motion Booster V2 LoRA",
1239
+ minimum=0.0,
1240
+ maximum=2.0,
1241
+ step=0.05,
1242
+ value=DEFAULT_LORA_J_STRENGTH,
1243
+ )
1244
 
1245
  with gr.Accordion("Staged Denoising", open=False):
1246
  gr.Markdown(
 
1317
  lora_e_strength,
1318
  lora_f_strength,
1319
  lora_g_strength,
1320
+ lora_j_strength,
1321
  maximize_gpu,
1322
  video_shift,
1323
  audio_shift,