dagloop5 commited on
Commit
b2a61b4
·
verified ·
1 Parent(s): 45e9a0f

Update app(workingwithsafetensorscache).py

Browse files
Files changed (1) hide show
  1. app(workingwithsafetensorscache).py +44 -8
app(workingwithsafetensorscache).py CHANGED
@@ -305,8 +305,11 @@ dreamlay_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="DR34ML4Y_LTXXX
305
  mself_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="Furry Hyper Masturbation - LTX-2 I2V v1.safetensors") # Hyperfap
306
  dramatic_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="LTX-2.3 - Orgasm.safetensors") # "[He | She] is having am orgasm." (am or an?)
307
  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 animation
308
- liquid_lora_path = hf_hub_download(repo_id="valiantcat/LTX-2.3-Transition-LORA", filename="ltx2.3-transition.safetensors") # wet dr1pp
309
- demopose_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="hentai_voice_ltx23.safetensors")
 
 
 
310
 
311
  print(f"Pose LoRA: {pose_lora_path}")
312
  print(f"General LoRA: {general_lora_path}")
@@ -317,6 +320,9 @@ print(f"Dramatic LoRA: {dramatic_lora_path}")
317
  print(f"Fluid LoRA: {fluid_lora_path}")
318
  print(f"Liquid LoRA: {liquid_lora_path}")
319
  print(f"Demopose LoRA: {demopose_lora_path}")
 
 
 
320
  # ----------------------------------------------------------------
321
 
322
  print(f"Checkpoint: {checkpoint_path}")
@@ -334,7 +340,7 @@ pipeline = LTX23DistilledA2VPipeline(
334
  )
335
  # ----------------------------------------------------------------
336
 
337
- def _make_lora_key(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) -> tuple[str, str]:
338
  rp = round(float(pose_strength), 2)
339
  rg = round(float(general_strength), 2)
340
  rm = round(float(motion_strength), 2)
@@ -344,7 +350,10 @@ def _make_lora_key(pose_strength: float, general_strength: float, motion_strengt
344
  rf = round(float(fluid_strength), 2)
345
  rl = round(float(liquid_strength), 2)
346
  ro = round(float(demopose_strength), 2)
347
- 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}"
 
 
 
348
  key = hashlib.sha256(key_str.encode("utf-8")).hexdigest()
349
  return key, key_str
350
 
@@ -359,6 +368,9 @@ def prepare_lora_cache(
359
  fluid_strength: float,
360
  liquid_strength: float,
361
  demopose_strength: float,
 
 
 
362
  progress=gr.Progress(track_tqdm=True),
363
  ):
364
  """
@@ -371,7 +383,7 @@ def prepare_lora_cache(
371
  global PENDING_LORA_KEY, PENDING_LORA_STATE, PENDING_LORA_STATUS
372
 
373
  ledger = pipeline.model_ledger
374
- key, _ = _make_lora_key(pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength)
375
  cache_path = LORA_CACHE_DIR / f"{key}.safetensors"
376
 
377
  progress(0.05, desc="Preparing LoRA state")
@@ -396,6 +408,9 @@ def prepare_lora_cache(
396
  (fluid_lora_path, round(float(fluid_strength), 2)),
397
  (liquid_lora_path, round(float(liquid_strength), 2)),
398
  (demopose_lora_path, round(float(demopose_strength), 2)),
 
 
 
399
  ]
400
  loras_for_builder = [
401
  LoraPathStrengthAndSDOps(path, strength, LTXV_LORA_COMFY_RENAMING_MAP)
@@ -589,6 +604,9 @@ def get_gpu_duration(
589
  fluid_strength: float = 0.0,
590
  liquid_strength: float = 0.0,
591
  demopose_strength: float = 0.0,
 
 
 
592
  progress=None,
593
  ):
594
  return int(gpu_duration)
@@ -616,6 +634,9 @@ def generate_video(
616
  fluid_strength: float = 0.0,
617
  liquid_strength: float = 0.0,
618
  demopose_strength: float = 0.0,
 
 
 
619
  progress=gr.Progress(track_tqdm=True),
620
  ):
621
  try:
@@ -760,6 +781,18 @@ with gr.Blocks(title="LTX-2.3 Distilled") as demo:
760
  label="Audio Helper strength",
761
  minimum=0.0, maximum=2.0, value=0.0, step=0.01
762
  )
 
 
 
 
 
 
 
 
 
 
 
 
763
  prepare_lora_btn = gr.Button("Prepare / Load LoRA Cache", variant="secondary")
764
  lora_status = gr.Textbox(
765
  label="LoRA Cache Status",
@@ -805,12 +838,15 @@ with gr.Blocks(title="LTX-2.3 Distilled") as demo:
805
  0.0,
806
  0.0,
807
  0.0,
 
 
 
808
  ],
809
  ],
810
  inputs=[
811
  first_image, last_image, input_audio, prompt, duration, gpu_duration,
812
  enhance_prompt, seed, randomize_seed, height, width,
813
- pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength,
814
  ],
815
  )
816
 
@@ -834,7 +870,7 @@ with gr.Blocks(title="LTX-2.3 Distilled") as demo:
834
 
835
  prepare_lora_btn.click(
836
  fn=prepare_lora_cache,
837
- inputs=[pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength],
838
  outputs=[lora_status],
839
  )
840
 
@@ -843,7 +879,7 @@ with gr.Blocks(title="LTX-2.3 Distilled") as demo:
843
  inputs=[
844
  first_image, last_image, input_audio, prompt, duration, gpu_duration, enhance_prompt,
845
  seed, randomize_seed, height, width,
846
- pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength,
847
  ],
848
  outputs=[output_video, seed],
849
  )
 
305
  mself_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="Furry Hyper Masturbation - LTX-2 I2V v1.safetensors") # Hyperfap
306
  dramatic_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="LTX-2.3 - Orgasm.safetensors") # "[He | She] is having am orgasm." (am or an?)
307
  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 animation
308
+ liquid_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="dagloop5/LoRA") # wet dr1pp
309
+ demopose_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="clapping-cheeks-audio-v001-alpha.safetensors")
310
+ voice_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="hentai_voice_ltx23.safetensors")
311
+ realism_lora_path = hf_hub_download(repo_id=LORA_REPO, filename="FurryenhancerLTX2.3V1.215.safetensors")
312
+ transition_lora_path = hf_hub_download(repo_id="valiantcat/LTX-2.3-Transition-LORA", filename="ltx2.3-transition.safetensors") # wet dr1pp
313
 
314
  print(f"Pose LoRA: {pose_lora_path}")
315
  print(f"General LoRA: {general_lora_path}")
 
320
  print(f"Fluid LoRA: {fluid_lora_path}")
321
  print(f"Liquid LoRA: {liquid_lora_path}")
322
  print(f"Demopose LoRA: {demopose_lora_path}")
323
+ print(f"Voice LoRA: {voice_lora_path}")
324
+ print(f"Realism LoRA: {realism_lora_path}")
325
+ print(f"Transition LoRA: {transition_lora_path}")
326
  # ----------------------------------------------------------------
327
 
328
  print(f"Checkpoint: {checkpoint_path}")
 
340
  )
341
  # ----------------------------------------------------------------
342
 
343
+ def _make_lora_key(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, voice_strength: float, realism_strength: float, transition_strength: float) -> tuple[str, str]:
344
  rp = round(float(pose_strength), 2)
345
  rg = round(float(general_strength), 2)
346
  rm = round(float(motion_strength), 2)
 
350
  rf = round(float(fluid_strength), 2)
351
  rl = round(float(liquid_strength), 2)
352
  ro = round(float(demopose_strength), 2)
353
+ rv = round(float(voice_strength), 2)
354
+ re = round(float(realism_strength), 2)
355
+ rt = round(float(transition_strength), 2)
356
+ 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}|{voice_lora_path}:{rv}|{realism_lora_path}:{re}|{transition_lora_path}:{rt}"
357
  key = hashlib.sha256(key_str.encode("utf-8")).hexdigest()
358
  return key, key_str
359
 
 
368
  fluid_strength: float,
369
  liquid_strength: float,
370
  demopose_strength: float,
371
+ voice_strength: float,
372
+ realism_strength: float,
373
+ transition_strength: float,
374
  progress=gr.Progress(track_tqdm=True),
375
  ):
376
  """
 
383
  global PENDING_LORA_KEY, PENDING_LORA_STATE, PENDING_LORA_STATUS
384
 
385
  ledger = pipeline.model_ledger
386
+ key, _ = _make_lora_key(pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength, voice_strength, realism_strength, transition_strength)
387
  cache_path = LORA_CACHE_DIR / f"{key}.safetensors"
388
 
389
  progress(0.05, desc="Preparing LoRA state")
 
408
  (fluid_lora_path, round(float(fluid_strength), 2)),
409
  (liquid_lora_path, round(float(liquid_strength), 2)),
410
  (demopose_lora_path, round(float(demopose_strength), 2)),
411
+ (voice_lora_path, round(float(voice_strength), 2)),
412
+ (realism_lora_path, round(float(realism_strength), 2)),
413
+ (transition_lora_path, round(float(transition_strength), 2)),
414
  ]
415
  loras_for_builder = [
416
  LoraPathStrengthAndSDOps(path, strength, LTXV_LORA_COMFY_RENAMING_MAP)
 
604
  fluid_strength: float = 0.0,
605
  liquid_strength: float = 0.0,
606
  demopose_strength: float = 0.0,
607
+ voice_strength: float = 0.0,
608
+ realism_strength: float = 0.0,
609
+ transition_strength: float = 0.0,
610
  progress=None,
611
  ):
612
  return int(gpu_duration)
 
634
  fluid_strength: float = 0.0,
635
  liquid_strength: float = 0.0,
636
  demopose_strength: float = 0.0,
637
+ voice_strength: float = 0.0,
638
+ realism_strength: float = 0.0,
639
+ transition_strength: float = 0.0,
640
  progress=gr.Progress(track_tqdm=True),
641
  ):
642
  try:
 
781
  label="Audio Helper strength",
782
  minimum=0.0, maximum=2.0, value=0.0, step=0.01
783
  )
784
+ voice_strength = gr.Slider(
785
+ label="Voice Helper strength",
786
+ minimum=0.0, maximum=2.0, value=0.0, step=0.01
787
+ )
788
+ realism_strength = gr.Slider(
789
+ label="Anthro Realism strength",
790
+ minimum=0.0, maximum=2.0, value=0.0, step=0.01
791
+ )
792
+ transition_strength = gr.Slider(
793
+ label="Transition strength",
794
+ minimum=0.0, maximum=2.0, value=0.0, step=0.01
795
+ )
796
  prepare_lora_btn = gr.Button("Prepare / Load LoRA Cache", variant="secondary")
797
  lora_status = gr.Textbox(
798
  label="LoRA Cache Status",
 
838
  0.0,
839
  0.0,
840
  0.0,
841
+ 0.0,
842
+ 0.0,
843
+ 0.0,
844
  ],
845
  ],
846
  inputs=[
847
  first_image, last_image, input_audio, prompt, duration, gpu_duration,
848
  enhance_prompt, seed, randomize_seed, height, width,
849
+ pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength, voice_strength, realism_strength, transition_strength,
850
  ],
851
  )
852
 
 
870
 
871
  prepare_lora_btn.click(
872
  fn=prepare_lora_cache,
873
+ inputs=[pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength, voice_strength, realism_strength, transition_strength],
874
  outputs=[lora_status],
875
  )
876
 
 
879
  inputs=[
880
  first_image, last_image, input_audio, prompt, duration, gpu_duration, enhance_prompt,
881
  seed, randomize_seed, height, width,
882
+ pose_strength, general_strength, motion_strength, dreamlay_strength, mself_strength, dramatic_strength, fluid_strength, liquid_strength, demopose_strength, voice strength, realism_strength, transition_strength,
883
  ],
884
  outputs=[output_video, seed],
885
  )