Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,7 +49,7 @@ LORA_FILES = {
|
|
| 49 |
"lorab": (LORA_REPO, os.environ.get("H3_LORA_B_FILE", "H3_VBVR_Pro_attn_only.safetensors")),
|
| 50 |
"lorac": (LORA_REPO, os.environ.get("H3_LORA_C_FILE", "HM-AIO-V2.5.safetensors")),
|
| 51 |
"lorad": (LORA_REPO, os.environ.get("H3_LORA_D_FILE", "Furry enhancer Video H3 V2.54.safetensors")),
|
| 52 |
-
"lorae": (LORA_REPO, os.environ.get("H3_LORA_E_FILE", "
|
| 53 |
"loraf": (LORA_REPO, os.environ.get("H3_LORA_F_FILE", "moawxx_000002000.safetensors")),
|
| 54 |
"lorag": (LORA_REPO, os.environ.get("H3_LORA_G_FILE", "Mystic_MMH3-V4.safetensors")),
|
| 55 |
"lorah": (
|
|
@@ -63,6 +63,7 @@ LORA_FILES = {
|
|
| 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.
|
|
@@ -80,6 +81,7 @@ LORA_LABELS = {
|
|
| 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
|
|
@@ -94,6 +96,7 @@ 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
|
|
@@ -867,6 +870,7 @@ def generate(
|
|
| 867 |
lora_j_strength=DEFAULT_LORA_J_STRENGTH,
|
| 868 |
lora_k_strength=DEFAULT_LORA_K_STRENGTH,
|
| 869 |
lora_l_strength=DEFAULT_LORA_L_STRENGTH,
|
|
|
|
| 870 |
maximize_gpu=False,
|
| 871 |
video_shift=DEFAULT_VIDEO_SHIFT,
|
| 872 |
audio_shift=DEFAULT_AUDIO_SHIFT,
|
|
@@ -1013,7 +1017,7 @@ def generate(
|
|
| 1013 |
|
| 1014 |
# Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
|
| 1015 |
# needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
|
| 1016 |
-
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)}
|
| 1017 |
|
| 1018 |
progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")
|
| 1019 |
call = (
|
|
@@ -1531,6 +1535,13 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
|
|
| 1531 |
step=0.05,
|
| 1532 |
value=DEFAULT_LORA_L_STRENGTH,
|
| 1533 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1534 |
|
| 1535 |
with gr.Accordion("Staged Denoising", open=False):
|
| 1536 |
gr.Markdown(
|
|
@@ -1647,6 +1658,7 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
|
|
| 1647 |
lora_j_strength,
|
| 1648 |
lora_k_strength,
|
| 1649 |
lora_l_strength,
|
|
|
|
| 1650 |
maximize_gpu,
|
| 1651 |
video_shift,
|
| 1652 |
audio_shift,
|
|
|
|
| 49 |
"lorab": (LORA_REPO, os.environ.get("H3_LORA_B_FILE", "H3_VBVR_Pro_attn_only.safetensors")),
|
| 50 |
"lorac": (LORA_REPO, os.environ.get("H3_LORA_C_FILE", "HM-AIO-V2.5.safetensors")),
|
| 51 |
"lorad": (LORA_REPO, os.environ.get("H3_LORA_D_FILE", "Furry enhancer Video H3 V2.54.safetensors")),
|
| 52 |
+
"lorae": (LORA_REPO, os.environ.get("H3_LORA_E_FILE", "sb_H3_v2.0.safetensors")),
|
| 53 |
"loraf": (LORA_REPO, os.environ.get("H3_LORA_F_FILE", "moawxx_000002000.safetensors")),
|
| 54 |
"lorag": (LORA_REPO, os.environ.get("H3_LORA_G_FILE", "Mystic_MMH3-V4.safetensors")),
|
| 55 |
"lorah": (
|
|
|
|
| 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 |
+
"loram": (LORA_REPO, os.environ.get("H3_LORA_M_FILE", "MMH3-FPOV-000160.safetensors")),
|
| 67 |
}
|
| 68 |
# Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and
|
| 69 |
# the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.
|
|
|
|
| 81 |
"loraj": "Motion Booster V2",
|
| 82 |
"lorak": "H3 Unlocked LoRA",
|
| 83 |
"loral": "Ending LoRA",
|
| 84 |
+
"loram": "FPOV LoRA",
|
| 85 |
}
|
| 86 |
DEFAULT_LORA_1_STRENGTH = 0.0
|
| 87 |
DEFAULT_LORA_A_STRENGTH = 0.0
|
|
|
|
| 96 |
DEFAULT_LORA_J_STRENGTH = 0.0
|
| 97 |
DEFAULT_LORA_K_STRENGTH = 0.0
|
| 98 |
DEFAULT_LORA_L_STRENGTH = 0.0
|
| 99 |
+
DEFAULT_LORA_M_STRENGTH = 0.0
|
| 100 |
# Per-LoRA, not global: different training pipelines can store SwiGLU's fc1 gate/value halves in either order,
|
| 101 |
# and one flag can only be right for however many of the 8 files happen to agree. `lora1` (the Distilled/Turbo
|
| 102 |
# LoRA) is confirmed needing the swap by InstantX's official conversion of the same lineage
|
|
|
|
| 870 |
lora_j_strength=DEFAULT_LORA_J_STRENGTH,
|
| 871 |
lora_k_strength=DEFAULT_LORA_K_STRENGTH,
|
| 872 |
lora_l_strength=DEFAULT_LORA_L_STRENGTH,
|
| 873 |
+
lora_m_strength=DEFAULT_LORA_M_STRENGTH,
|
| 874 |
maximize_gpu=False,
|
| 875 |
video_shift=DEFAULT_VIDEO_SHIFT,
|
| 876 |
audio_shift=DEFAULT_AUDIO_SHIFT,
|
|
|
|
| 1017 |
|
| 1018 |
# Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
|
| 1019 |
# needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
|
| 1020 |
+
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), "loram": float(lora_m_strength)}
|
| 1021 |
|
| 1022 |
progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")
|
| 1023 |
call = (
|
|
|
|
| 1535 |
step=0.05,
|
| 1536 |
value=DEFAULT_LORA_L_STRENGTH,
|
| 1537 |
)
|
| 1538 |
+
lora_m_strength = gr.Slider(
|
| 1539 |
+
label="FPOV LoRA",
|
| 1540 |
+
minimum=0.0,
|
| 1541 |
+
maximum=2.0,
|
| 1542 |
+
step=0.05,
|
| 1543 |
+
value=DEFAULT_LORA_M_STRENGTH,
|
| 1544 |
+
)
|
| 1545 |
|
| 1546 |
with gr.Accordion("Staged Denoising", open=False):
|
| 1547 |
gr.Markdown(
|
|
|
|
| 1658 |
lora_j_strength,
|
| 1659 |
lora_k_strength,
|
| 1660 |
lora_l_strength,
|
| 1661 |
+
lora_m_strength,
|
| 1662 |
maximize_gpu,
|
| 1663 |
video_shift,
|
| 1664 |
audio_shift,
|