Update app.py
Browse files48 unmodified lines495051525354557 unmodified lines63646566676811 unmodified lines8081828384858 unmodified lines949596979899767 unmodified lines867868869870871872140 unmodified lines1013101410151016101710181019511 unmodified lines153115321533153415351536110 unmodified lines16471648164916501651165248 unmodified lines"lorab": (LORA_REPO, os.environ.get("H3_LORA_B_FILE", "H3_VBVR_Pro_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": (7 unmodified lines"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.11 unmodified lines"loraj": "Motion Booster V2","lorak": "H3 Unlocked LoRA","loral": "Ending LoRA",}DEFAULT_LORA_1_STRENGTH = 0.0DEFAULT_LORA_A_STRENGTH = 0.08 unmodified linesDEFAULT_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 lineage767 unmodified lineslora_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,140 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 = (511 unmodified linesstep=0.05,value=DEFAULT_LORA_L_STRENGTH,)with gr.Accordion("Staged Denoising", open=False):gr.Markdown(110 unmodified lineslora_j_strength,lora_k_strength,lora_l_strength,maximize_gpu,video_shift,audio_shift,48 unmodified lines495051525354557 unmodified lines6364656667686911 unmodified lines818283848586878 unmodified lines96979899100101102767 unmodified lines870871872873874875876140 unmodified lines1017101810191020102110221023511 unmodified lines1535153615371538153915401541154215431544154515461547110 unmodified lines165816591660166116621663166448 unmodified lines"lorab": (LORA_REPO, os.environ.get("H3_LORA_B_FILE", "H3_VBVR_Pro_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_v2.0.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": (7 unmodified lines"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")),"loram": (LORA_REPO, os.environ.get("H3_LORA_M_FILE", "MMH3-FPOV-000160.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.11 unmodified lines"loraj": "Motion Booster V2","lorak": "H3 Unlocked LoRA","loral": "Ending LoRA","loram": "FPOV LoRA",}DEFAULT_LORA_1_STRENGTH = 0.0DEFAULT_LORA_A_STRENGTH = 0.08 unmodified linesDEFAULT_LORA_J_STRENGTH = 0.0DEFAULT_LORA_K_STRENGTH = 0.0DEFAULT_LORA_L_STRENGTH = 0.0DEFAULT_LORA_M_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 lineage767 unmodified lineslora_j_strength=DEFAULT_LORA_J_STRENGTH,lora_k_strength=DEFAULT_LORA_K_STRENGTH,lora_l_strength=DEFAULT_LORA_L_STRENGTH,lora_m_strength=DEFAULT_LORA_M_STRENGTH,maximize_gpu=False,video_shift=DEFAULT_VIDEO_SHIFT,audio_shift=DEFAULT_AUDIO_SHIFT,140 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), "loram": float(lora_m_strength)}progress(0.1, desc=f"Denoising {this_stage_steps} steps at {width}x{height}, {num_frames} frames ...")call = (511 unmodified linesstep=0.05,value=DEFAULT_LORA_L_STRENGTH,)lora_m_strength = gr.Slider(label="FPOV LoRA",minimum=0.0,maximum=2.0,step=0.05,value=DEFAULT_LORA_M_STRENGTH,)with gr.Accordion("Staged Denoising", open=False):gr.Markdown(110 unmodified lineslora_j_strength,lora_k_strength,lora_l_strength,lora_m_strength,maximize_gpu,video_shift,audio_shift,
app.py+14-2