Update app.py
Browse files60 unmodified lines6162636465669 unmodified lines7677787980816 unmodified lines888990919293679 unmodified lines77377477577677777896 unmodified lines875876877878879880881362 unmodified lines12441245124612471248124971 unmodified lines13211322132313241325132660 unmodified linesos.environ.get("H3_LORA_I_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_bf16.safetensors"),),"loraj": (LORA_REPO, os.environ.get("H3_LORA_J_FILE", "H3_Motion_BoosterV2.safetensors")),}# Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and# the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.9 unmodified lines"lorah": "Lightx2v-Minimax-H3 Turbo 768p LoRA","lorai": "Lightx2v-Minimax-H3 Turbo 8-step LoRA","loraj": "Motion Booster V2",}DEFAULT_LORA_1_STRENGTH = 0.0DEFAULT_LORA_A_STRENGTH = 0.06 unmodified linesDEFAULT_LORA_H_STRENGTH = 0.0DEFAULT_LORA_I_STRENGTH = 0.0DEFAULT_LORA_J_STRENGTH = 0.0# Per-LoRA, not global: different training pipelines can store SwiGLU's fc1 gate/value halves in either order,# and one flag can only be right for however many of the 8 files happen to agree. `lora1` (the Distilled/Turbo# LoRA) is confirmed needing the swap by InstantX's official conversion of the same lineage679 unmodified lineslora_f_strength=DEFAULT_LORA_F_STRENGTH,lora_g_strength=DEFAULT_LORA_G_STRENGTH,lora_j_strength=DEFAULT_LORA_J_STRENGTH,maximize_gpu=False,video_shift=DEFAULT_VIDEO_SHIFT,audio_shift=DEFAULT_AUDIO_SHIFT,96 unmodified lines# Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value# needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.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)}progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")call = (362 unmodified linesstep=0.05,value=DEFAULT_LORA_J_STRENGTH,)with gr.Accordion("Staged Denoising", open=False):gr.Markdown(71 unmodified lineslora_f_strength,lora_g_strength,lora_j_strength,maximize_gpu,video_shift,audio_shift,60 unmodified lines61626364656667689 unmodified lines78798081828384856 unmodified lines9293949596979899679 unmodified lines77978078178278378478578696 unmodified lines883884885886887888889362 unmodified lines1252125312541255125612571258125912601261126212631264126512661267126812691270127171 unmodified lines1343134413451346134713481349135060 unmodified linesos.environ.get("H3_LORA_I_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_bf16.safetensors"),),"loraj": (LORA_REPO, os.environ.get("H3_LORA_J_FILE", "H3_Motion_BoosterV2.safetensors")),"lorak": (LORA_REPO, os.environ.get("H3_LORA_k_FILE", "H3_Unlocked_V2.safetensors")),"loral": (LORA_REPO, os.environ.get("H3_LORA_l_FILE", "Ending_V1.safetensors")),}# Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and# the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.9 unmodified lines"lorah": "Lightx2v-Minimax-H3 Turbo 768p LoRA","lorai": "Lightx2v-Minimax-H3 Turbo 8-step LoRA","loraj": "Motion Booster V2","lorak": "H3 Unlocked LoRA","loral": "Ending LoRA",}DEFAULT_LORA_1_STRENGTH = 0.0DEFAULT_LORA_A_STRENGTH = 0.06 unmodified linesDEFAULT_LORA_H_STRENGTH = 0.0DEFAULT_LORA_I_STRENGTH = 0.0DEFAULT_LORA_J_STRENGTH = 0.0DEFAULT_LORA_K_STRENGTH = 0.0DEFAULT_LORA_L_STRENGTH = 0.0# Per-LoRA, not global: different training pipelines can store SwiGLU's fc1 gate/value halves in either order,# and one flag can only be right for however many of the 8 files happen to agree. `lora1` (the Distilled/Turbo# LoRA) is confirmed needing the swap by InstantX's official conversion of the same lineage679 unmodified lineslora_f_strength=DEFAULT_LORA_F_STRENGTH,lora_g_strength=DEFAULT_LORA_G_STRENGTH,lora_j_strength=DEFAULT_LORA_J_STRENGTH,lora_k_strength=DEFAULT_LORA_K_STRENGTH,lora_l_strength=DEFAULT_LORA_L_STRENGTH,maximize_gpu=False,video_shift=DEFAULT_VIDEO_SHIFT,audio_shift=DEFAULT_AUDIO_SHIFT,96 unmodified lines# Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value# needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.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)}progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")call = (362 unmodified linesstep=0.05,value=DEFAULT_LORA_J_STRENGTH,)lora_k_strength = gr.Slider(label="H3 Unlocked LoRA",minimum=0.0,maximum=2.0,step=0.05,value=DEFAULT_LORA_K_STRENGTH,)lora_l_strength = gr.Slider(label="Ending LoRA",minimum=0.0,maximum=2.0,step=0.05,value=DEFAULT_LORA_L_STRENGTH,)with gr.Accordion("Staged Denoising", open=False):gr.Markdown(71 unmodified lineslora_f_strength,lora_g_strength,lora_j_strength,lora_k_strength,lora_l_strength,maximize_gpu,video_shift,audio_shift,
app.py+25-1