Update app.py
Browse files43 unmodified lines444546474748495051525354545556575859606162638 unmodified lines727374757677785 unmodified lines84858687888990678 unmodified lines76977077177277377477596 unmodified lines872873874871875876877878290 unmodified lines1169117011711168117211731174117524 unmodified lines1200120112021199120312041205120627 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", "AIO_V2.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_4step_v1.1_768p_bf16.safetensors"), 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 lines lora_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)} 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 lines info="Video/Audio Shift = 6/3", ) lora_h_strength = gr.Slider( label="Lightx2v-Minimax-H3 Turbo 768p LoRA", label="Lightx2v-Minimax-H3 Turbo 8-step 768p LoRA", minimum=0.0, maximum=2.0, step=0.05,24 unmodified lines value=DEFAULT_LORA_B_STRENGTH, ) lora_c_strength = gr.Slider( label="HM-AIO LoRA", label="HM-AIO V2.5 LoRA", minimum=0.0, maximum=2.0, step=0.05,27 unmodified lines step=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 lines lora_e_strength, lora_f_strength, lora_g_strength, lora_j_strength, maximize_gpu, video_shift, audio_shift,app.py+17-5