dagloop5 commited on
Commit
a52619d
·
verified ·
1 Parent(s): 915963a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +61 -1
app.py CHANGED
@@ -39,15 +39,30 @@ LORA_REPO = os.environ.get("H3_LORA_REPO", "dagloop5/LoRA")
39
  LORA_FILES = {
40
  "loraa": os.environ.get("H3_LORA_A_FILE", "Mylo_lora_epoch31.safetensors"),
41
  "lorab": os.environ.get("H3_LORA_B_FILE", "VBVR_H3_attn_only.safetensors"),
 
 
 
 
 
42
  }
43
  # Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and
44
  # the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.
45
  LORA_LABELS = {
46
  "loraa": "Anthro Enhancer",
47
  "lorab": "Reasoning Enhancer",
 
 
 
 
 
48
  }
49
  DEFAULT_LORA_A_STRENGTH = 0.0
50
  DEFAULT_LORA_B_STRENGTH = 0.0
 
 
 
 
 
51
  # Some `diffusion_model.blocks.*` checkpoints store SwiGLU's fc1 gate/value halves in the opposite order
52
  # diffusers expects. Leave off first; if the LoRA's effect looks inverted/broken rather than just weak or
53
  # strong, set H3_LORA_SWAP_FC1=1 and compare.
@@ -529,6 +544,11 @@ def generate(
529
  upsample=False,
530
  lora_a_strength=DEFAULT_LORA_A_STRENGTH,
531
  lora_b_strength=DEFAULT_LORA_B_STRENGTH,
 
 
 
 
 
532
  progress=gr.Progress(track_tqdm=True),
533
  ):
534
  """One request through the PlagueKind graph. Every parameter but the prompt carries the default its UI
@@ -570,7 +590,7 @@ def generate(
570
 
571
  # Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
572
  # needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
573
- lora_strengths = {"loraa": float(lora_a_strength), "lorab": float(lora_b_strength)}
574
 
575
  progress(0.1, desc=f"Denoising {int(steps)} steps at {width}x{height}, {num_frames} frames ...")
576
  call = (
@@ -727,6 +747,41 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
727
  step=0.05,
728
  value=DEFAULT_LORA_B_STRENGTH,
729
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
730
  schedule = gr.Dropdown(
731
  label="Sigma schedule",
732
  choices=list(SCHEDULES),
@@ -775,6 +830,11 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
775
  upsample,
776
  lora_a_strength,
777
  lora_b_strength,
 
 
 
 
 
778
  ]
779
 
780
  run.click(generate, controls, [video, report], api_name="generate")
 
39
  LORA_FILES = {
40
  "loraa": os.environ.get("H3_LORA_A_FILE", "Mylo_lora_epoch31.safetensors"),
41
  "lorab": os.environ.get("H3_LORA_B_FILE", "VBVR_H3_attn_only.safetensors"),
42
+ "lorac": os.environ.get("H3_LORA_C_FILE", "AIO_V2.safetensors"),
43
+ "lorad": os.environ.get("H3_LORA_D_FILE", "Furry enhancer Video H3 V2.54.safetensors"),
44
+ "lorae": os.environ.get("H3_LORA_E_FILE", "sb_H3_i2v_v1.1.safetensors"),
45
+ "loraf": os.environ.get("H3_LORA_F_FILE", "moawxx_000002000.safetensors"),
46
+ "lorag": os.environ.get("H3_LORA_G_FILE", "H3_ref2va_shot_v1_fp16.safetensors"),
47
  }
48
  # Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and
49
  # the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.
50
  LORA_LABELS = {
51
  "loraa": "Anthro Enhancer",
52
  "lorab": "Reasoning Enhancer",
53
+ "lorac": "HM-AIO", # hmmotion
54
+ "lorad": "Anthro Realism",
55
+ "lorae": "SB",
56
+ "loraf": "Moaxx", # moawxx
57
+ "lorag": "Fluid Enhancer",
58
  }
59
  DEFAULT_LORA_A_STRENGTH = 0.0
60
  DEFAULT_LORA_B_STRENGTH = 0.0
61
+ DEFAULT_LORA_C_STRENGTH = 0.0
62
+ DEFAULT_LORA_D_STRENGTH = 0.0
63
+ DEFAULT_LORA_E_STRENGTH = 0.0
64
+ DEFAULT_LORA_F_STRENGTH = 0.0
65
+ DEFAULT_LORA_G_STRENGTH = 0.0
66
  # Some `diffusion_model.blocks.*` checkpoints store SwiGLU's fc1 gate/value halves in the opposite order
67
  # diffusers expects. Leave off first; if the LoRA's effect looks inverted/broken rather than just weak or
68
  # strong, set H3_LORA_SWAP_FC1=1 and compare.
 
544
  upsample=False,
545
  lora_a_strength=DEFAULT_LORA_A_STRENGTH,
546
  lora_b_strength=DEFAULT_LORA_B_STRENGTH,
547
+ lora_c_strength=DEFAULT_LORA_C_STRENGTH,
548
+ lora_d_strength=DEFAULT_LORA_D_STRENGTH,
549
+ lora_e_strength=DEFAULT_LORA_E_STRENGTH,
550
+ lora_f_strength=DEFAULT_LORA_F_STRENGTH,
551
+ lora_g_strength=DEFAULT_LORA_G_STRENGTH,
552
  progress=gr.Progress(track_tqdm=True),
553
  ):
554
  """One request through the PlagueKind graph. Every parameter but the prompt carries the default its UI
 
590
 
591
  # Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
592
  # needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
593
+ lora_strengths = {"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)}
594
 
595
  progress(0.1, desc=f"Denoising {int(steps)} steps at {width}x{height}, {num_frames} frames ...")
596
  call = (
 
747
  step=0.05,
748
  value=DEFAULT_LORA_B_STRENGTH,
749
  )
750
+ lora_c_strength = gr.Slider(
751
+ label="HM-AIO LoRA",
752
+ minimum=0.0,
753
+ maximum=2.0,
754
+ step=0.05,
755
+ value=DEFAULT_LORA_C_STRENGTH,
756
+ )
757
+ lora_d_strength = gr.Slider(
758
+ label="Anthro Realism LoRA",
759
+ minimum=0.0,
760
+ maximum=2.0,
761
+ step=0.05,
762
+ value=DEFAULT_LORA_D_STRENGTH,
763
+ )
764
+ lora_e_strength = gr.Slider(
765
+ label="SB LoRA",
766
+ minimum=0.0,
767
+ maximum=2.0,
768
+ step=0.05,
769
+ value=DEFAULT_LORA_E_STRENGTH,
770
+ )
771
+ lora_f_strength = gr.Slider(
772
+ label="Moaxx LoRA",
773
+ minimum=0.0,
774
+ maximum=2.0,
775
+ step=0.05,
776
+ value=DEFAULT_LORA_F_STRENGTH,
777
+ )
778
+ lora_g_strength = gr.Slider(
779
+ label="Fluid Enhancer LoRA",
780
+ minimum=0.0,
781
+ maximum=2.0,
782
+ step=0.05,
783
+ value=DEFAULT_LORA_G_STRENGTH,
784
+ )
785
  schedule = gr.Dropdown(
786
  label="Sigma schedule",
787
  choices=list(SCHEDULES),
 
830
  upsample,
831
  lora_a_strength,
832
  lora_b_strength,
833
+ lora_c_strength,
834
+ lora_d_strength,
835
+ lora_e_strength,
836
+ lora_f_strength,
837
+ lora_g_strength,
838
  ]
839
 
840
  run.click(generate, controls, [video, report], api_name="generate")