Spaces:
Paused
Paused
Update app.py
Browse files299 unmodified lines30030130230330430530630730830931031131231331431531631731831932032111 unmodified lines3333343353243363373383393283403413423433443453463473483492 unmodified lines3523533543553563573583593603613623636 unmodified lines37037137234937337437537612 unmodified lines389390391392393394395396397398399400183 unmodified lines58458558658758858959059159259359459515 unmodified lines61161261361461561661761861962062162269 unmodified lines69269369465365469569669769869926 unmodified lines72672772868772973073173269173373473573669573773873974074174274374474574674774874975075175275375475575675775875976076176276376435 unmodified lines80080180280380480580680780880981081181281374281481581681717 unmodified lines8358368377668388398408412 unmodified lines844845846775847848849850299 unmodified linespose_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="LTX2_3_NSFW_furry_concat_v2.safetensors")general_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="LTX2.3_Reasoning_V1.safetensors")motion_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="motion_helper.safetensors")dreamlay_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="DR34ML4Y_LTXXX_PREVIEW_RC1.safetensors") # m15510n4ry, bl0wj0b, d0ubl3_bj, d0gg1e, c0wg1rlmself_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="Furry Hyper Masturbation - LTX-2 I2V v1.safetensors") # Hyperfapdramatic_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="LTX-2.3 - Orgasm.safetensors") # "[He | She] is having am orgasm." (am or an?)fluid_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="cr3ampi3_animation_i2v_ltx2_v1.0.safetensors") # cr3ampi3 animation., missionary animation, doggystyle bouncy animation, double penetration animationliquid_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="liquid_wet_dr1pp_ltx2_v1.0_scaled.safetensors") # wet dr1ppdemopose_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="ltx23__demopose_d3m0p0s3.safetensors") # d3m0p0s3
print(f"Pose LoRA: {pose_lora_path}")print(f"General LoRA: {general_lora_path}")print(f"Motion LoRA: {motion_lora_path}")print(f"Dreamlay LoRA: {dreamlay_lora_path}")print(f"Mself LoRA: {mself_lora_path}")print(f"Dramatic LoRA: {dramatic_lora_path}")print(f"Fluid LoRA: {fluid_lora_path}")print(f"Liquid LoRA: {liquid_lora_path}")print(f"Demopose LoRA: {demopose_lora_path}")# ----------------------------------------------------------------
print(f"Checkpoint: {checkpoint_path}")11 unmodified lines)# ----------------------------------------------------------------
def _make_lora_key(pose_strength: float, general_strength: float, motion_strength: float) -> tuple[str, str]:def _make_lora_key(pose_strength: float, general_strength: float, motion_strength: float, dreamlay_strength: float, mself_stength: float, dramatic_strength: float, fluid_strength: float, liquid_strength: float, demopose_strength: float) -> tuple[str, str]: rp = round(float(pose_strength), 2) rg = round(float(general_strength), 2) rm = round(float(motion_strength), 2) key_str = f"{pose_lora_path}:{rp}|{general_lora_path}:{rg}|{motion_lora_path}:{rm}" rd = round(float(dreamlay_strength), 2) rs = round(float(mself_strength), 2) rr = round(float(dramatic_strength), 2) rf = round(float(fluid_strength), 2) rl = round(float(liquid_strength), 2) ro = round(float(demopose_strength), 2) key_str = f"{pose_lora_path}:{rp}|{general_lora_path}:{rg}|{motion_lora_path}:{rm}|{dreamlay_lora_path}:{rd}|{mself_lora_path}:{rs}|{dramatic_lora_path}:{rr}|{fluid_lora_path}:{rf}|{liquid_lora_path}:{rl}|{demopose_lora_path}:{ro}" key = hashlib.sha256(key_str.encode("utf-8")).hexdigest() return key, key_str
2 unmodified lines pose_strength: float, general_strength: float, motion_strength: float, dreamlay_strength: float, mself_strength: float, dramatic_strength: float, fluid_strength: float, liquid_strength: float, demopose_strength: float, progress=gr.Progress(track_tqdm=True),): """6 unmodified lines global PENDING_LORA_KEY, PENDING_LORA_STATE, PENDING_LORA_STATUS
ledger = pipeline.model_ledger key, _ = _make_lora_key(pose_strength, general_strength, motion_strength) key, _ = _make_lora_key(pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength) cache_path = LORA_CACHE_DIR / f"{key}.pt"
progress(0.05, desc="Preparing LoRA state")12 unmodified lines (pose_lora_path, round(float(pose_strength), 2)), (general_lora_path, round(float(general_strength), 2)), (motion_lora_path, round(float(motion_strength), 2)), (dreamlay_lora_path, round(float(dreamlay_strength), 2)), (mself_lora_path, round(float(mself_strength), 2)), (dramatic_lora_path, round(float(dramatic_strength), 2)), (fluid_lora_path, round(float(fluid_strength), 2)), (liquid_lora_path, round(float(liquid_strength), 2)), (demopose_lora_path, round(float(demopose_strength), 2)), ] loras_for_builder = [ LoraPathStrengthAndSDOps(path, strength, LTXV_LORA_COMFY_RENAMING_MAP)183 unmodified lines pose_strength: float = 0.0, general_strength: float = 0.0, motion_strength: float = 0.0, dreamlay_strength: float = 0.0, mself_strength: float = 0.0, dramatic_strength: float = 0.0, fluid_strength: float = 0.0, liquid_strength: float = 0.0, demopose_strength: float = 0.0, progress=None,): return int(gpu_duration)15 unmodified lines pose_strength: float = 0.0, general_strength: float = 0.0, motion_strength: float = 0.0, dreamlay_strength: float = 0.0, mself_strength: float = 0.0, dramatic_strength: float = 0.0, fluid_strength: float = 0.0, liquid_strength: float = 0.0, demopose_strength: float = 0.0, progress=gr.Progress(track_tqdm=True),): try:69 unmodified lines return None, current_seed
with gr.Blocks(title="LTX-2.3 Heretic Distilled") as demo: gr.Markdown("# LTX-2.3 F2LF:Heretic with Fast Audio-Video Generation with Frame Conditioning")with gr.Blocks(title="LTX-2.3 Distilled") as demo: gr.Markdown("# LTX-2.3 F2LF with Fast Audio-Video Generation with Frame Conditioning")
with gr.Row():26 unmodified lines with gr.Column(): gr.Markdown("### LoRA adapter strengths (set to 0 to disable)") pose_strength = gr.Slider( label="Pose Enhancer strength", label="Anthro Enhancer strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) general_strength = gr.Slider( label="General Enhancer strength", label="Reasoning Enhancer strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) motion_strength = gr.Slider( label="Motion Helper strength", label="Anthro Posing Helper strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) motion_strength = gr.Slider( label="Dreamlay strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) motion_strength = gr.Slider( label="Mself strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) motion_strength = gr.Slider( label="Dramatic strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) motion_strength = gr.Slider( label="Fluid Helper strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) motion_strength = gr.Slider( label="Liquid Helper strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) motion_strength = gr.Slider( label="Demopose Helper strength", minimum=0.0, maximum=2.0, value=0.0, step=0.01 ) prepare_lora_btn = gr.Button("Prepare / Load LoRA Cache", variant="secondary")35 unmodified lines 0.0, # pose_strength (example) 0.0, # general_strength (example) 0.0, # motion_strength (example) 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ], ], inputs=[ first_image, last_image, input_audio, prompt, duration, gpu_duration, enhance_prompt, seed, randomize_seed, height, width, pose_strength, general_strength, motion_strength, pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength, ], )
17 unmodified lines
prepare_lora_btn.click( fn=prepare_lora_cache, inputs=[pose_strength, general_strength, motion_strength], inputs=[pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength], outputs=[lora_status], ) 2 unmodified lines inputs=[ first_image, last_image, input_audio, prompt, duration, gpu_duration, enhance_prompt, seed, randomize_seed, height, width, pose_strength, general_strength, motion_strength, pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength, ], outputs=[output_video, seed], )app.py+83-11