Update app.py
Browse files43 unmodified lines444546474849505152535455565758596061628 unmodified lines7172737475765 unmodified lines828384858687678 unmodified lines76676776876977077196 unmodified lines868869870871872873874290 unmodified lines116511661167116811691170117124 unmodified lines119611971198119912001201120227 unmodified lines12301231123212331234123570 unmodified lines13061307130813091310131143 unmodified lines"lora1": (LORA_REPO, os.environ.get("H3_LORA_1_FILE", "minimax_h3_turbo_v4_step600_ema.safetensors")),"loraa": (LORA_REPO, os.environ.get("H3_LORA_A_FILE", "Mylo_lora_epoch31.safetensors")),"lorab": (LORA_REPO, os.environ.get("H3_LORA_B_FILE", "VBVR_H3_attn_only.safetensors")),"lorac": (LORA_REPO, os.environ.get("H3_LORA_C_FILE", "AIO_V2.safetensors")),"lorad": (LORA_REPO, os.environ.get("H3_LORA_D_FILE", "Furry enhancer Video H3 V2.54.safetensors")),"lorae": (LORA_REPO, os.environ.get("H3_LORA_E_FILE", "sb_H3_i2v_v1.1.safetensors")),"loraf": (LORA_REPO, os.environ.get("H3_LORA_F_FILE", "moawxx_000002000.safetensors")),"lorag": (LORA_REPO, os.environ.get("H3_LORA_G_FILE", "Mystic_MMH3-V4.safetensors")),"lorah": (os.environ.get("H3_LORA_H_REPO", "lightx2v/Minimax-h3-Turbo"),os.environ.get("H3_LORA_H_FILE", "minimax_h3_fl2v_turbo_4step_v1.1_768p_bf16.safetensors"),),"lorai": (os.environ.get("H3_LORA_I_REPO", "lightx2v/Minimax-h3-Turbo"),os.environ.get("H3_LORA_I_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_bf16.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.8 unmodified lines"lorag": "Mystic-V4","lorah": "Lightx2v-Minimax-H3 Turbo 768p LoRA","lorai": "Lightx2v-Minimax-H3 Turbo 8-step LoRA",}DEFAULT_LORA_1_STRENGTH = 0.0DEFAULT_LORA_A_STRENGTH = 0.05 unmodified linesDEFAULT_LORA_G_STRENGTH = 0.0DEFAULT_LORA_H_STRENGTH = 0.0DEFAULT_LORA_I_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 lineage678 unmodified lineslora_e_strength=DEFAULT_LORA_E_STRENGTH,lora_f_strength=DEFAULT_LORA_F_STRENGTH,lora_g_strength=DEFAULT_LORA_G_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)}progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")call = (290 unmodified linesinfo="Video/Audio Shift = 6/3",)lora_h_strength = gr.Slider(label="Lightx2v-Minimax-H3 Turbo 768p LoRA",minimum=0.0,maximum=2.0,step=0.05,24 unmodified linesvalue=DEFAULT_LORA_B_STRENGTH,)lora_c_strength = gr.Slider(label="HM-AIO LoRA",minimum=0.0,maximum=2.0,step=0.05,27 unmodified linesstep=0.05,value=DEFAULT_LORA_G_STRENGTH,)with gr.Accordion("Staged Denoising", open=False):gr.Markdown(70 unmodified lineslora_e_strength,lora_f_strength,lora_g_strength,maximize_gpu,video_shift,audio_shift,43 unmodified lines44454647484950515253545556575859606162638 unmodified lines727374757677785 unmodified lines84858687888990678 unmodified lines76977077177277377477596 unmodified lines872873874875876877878290 unmodified lines116911701171117211731174117524 unmodified lines120012011202120312041205120627 unmodified lines123412351236123712381239124012411242124312441245124670 unmodified lines131713181319132013211322132343 unmodified lines"lora1": (LORA_REPO, os.environ.get("H3_LORA_1_FILE", "minimax_h3_turbo_v4_step600_ema.safetensors")),"loraa": (LORA_REPO, os.environ.get("H3_LORA_A_FILE", "Mylo_lora_epoch31.safetensors")),"lorab": (LORA_REPO, os.environ.get("H3_LORA_B_FILE", "VBVR_H3_attn_only.safetensors")),"lorac": (LORA_REPO, os.environ.get("H3_LORA_C_FILE", "HM-AIO-V2.5.safetensors")),"lorad": (LORA_REPO, os.environ.get("H3_LORA_D_FILE", "Furry enhancer Video H3 V2.54.safetensors")),"lorae": (LORA_REPO, os.environ.get("H3_LORA_E_FILE", "sb_H3_i2v_v1.1.safetensors")),"loraf": (LORA_REPO, os.environ.get("H3_LORA_F_FILE", "moawxx_000002000.safetensors")),"lorag": (LORA_REPO, os.environ.get("H3_LORA_G_FILE", "Mystic_MMH3-V4.safetensors")),"lorah": (os.environ.get("H3_LORA_H_REPO", "lightx2v/Minimax-h3-Turbo"),os.environ.get("H3_LORA_H_FILE", "minimax_h3_fl2v_turbo_8step_v1.0_768p_comfyui_bf16.safetensors"),),"lorai": (os.environ.get("H3_LORA_I_REPO", "lightx2v/Minimax-h3-Turbo"),os.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.8 unmodified lines"lorag": "Mystic-V4","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.05 unmodified linesDEFAULT_LORA_G_STRENGTH = 0.0DEFAULT_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 lineage678 unmodified lineslora_e_strength=DEFAULT_LORA_E_STRENGTH,lora_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 = (290 unmodified linesinfo="Video/Audio Shift = 6/3",)lora_h_strength = gr.Slider(label="Lightx2v-Minimax-H3 Turbo 8-step 768p LoRA",minimum=0.0,maximum=2.0,step=0.05,24 unmodified linesvalue=DEFAULT_LORA_B_STRENGTH,)lora_c_strength = gr.Slider(label="HM-AIO V2.5 LoRA",minimum=0.0,maximum=2.0,step=0.05,27 unmodified linesstep=0.05,value=DEFAULT_LORA_G_STRENGTH,)lora_j_strength = gr.Slider(label="H3 Motion Booster V2 LoRA",minimum=0.0,maximum=2.0,step=0.05,value=DEFAULT_LORA_J_STRENGTH,)with gr.Accordion("Staged Denoising", open=False):gr.Markdown(70 unmodified lineslora_e_strength,lora_f_strength,lora_g_strength,lora_j_strength,maximize_gpu,video_shift,audio_shift,
app.py+17-5