dagloop5 commited on
Commit
137e4f8
·
verified ·
1 Parent(s): 83c2e8d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -37,6 +37,7 @@ GPU_SIZE = os.environ.get("H3_GPU_SIZE", "xlarge")
37
 
38
  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
  "lorac": os.environ.get("H3_LORA_C_FILE", "AIO_V2.safetensors"),
@@ -48,6 +49,7 @@ LORA_FILES = {
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
@@ -56,6 +58,7 @@ LORA_LABELS = {
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
@@ -542,6 +545,7 @@ def generate(
542
  interpolation=DEFAULT_INTERPOLATION,
543
  seed=42,
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,
@@ -590,7 +594,7 @@ def generate(
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 = (
@@ -733,6 +737,13 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
733
  value=DEFAULT_STEPS,
734
  info="PlagueKind: 15-20 on the linear_quadratic grid.",
735
  )
 
 
 
 
 
 
 
736
  lora_a_strength = gr.Slider(
737
  label="Anthro Enhancer LoRA",
738
  minimum=0.0,
@@ -828,6 +839,7 @@ with gr.Blocks(title="PlagueKind · MiniMax-H3") as demo:
828
  interpolation,
829
  seed,
830
  upsample,
 
831
  lora_a_strength,
832
  lora_b_strength,
833
  lora_c_strength,
 
37
 
38
  LORA_REPO = os.environ.get("H3_LORA_REPO", "dagloop5/LoRA")
39
  LORA_FILES = {
40
+ "lora1": os.environ.get("H3_LORA_A_FILE", "minimax_h3_turbo_v4_step600_ema.safetensors"),
41
  "loraa": os.environ.get("H3_LORA_A_FILE", "Mylo_lora_epoch31.safetensors"),
42
  "lorab": os.environ.get("H3_LORA_B_FILE", "VBVR_H3_attn_only.safetensors"),
43
  "lorac": os.environ.get("H3_LORA_C_FILE", "AIO_V2.safetensors"),
 
49
  # Display names, keyed the same as LORA_FILES — used in the UI slider labels, the per-request report line, and
50
  # the status line's failure list. Keep these two dicts' keys in sync when adding a LoRA.
51
  LORA_LABELS = {
52
+ "lora1": "Distilled LoRA",
53
  "loraa": "Anthro Enhancer",
54
  "lorab": "Reasoning Enhancer",
55
  "lorac": "HM-AIO", # hmmotion
 
58
  "loraf": "Moaxx", # moawxx
59
  "lorag": "Fluid Enhancer",
60
  }
61
+ DEFAULT_LORA_1_STRENGTH = 0.0
62
  DEFAULT_LORA_A_STRENGTH = 0.0
63
  DEFAULT_LORA_B_STRENGTH = 0.0
64
  DEFAULT_LORA_C_STRENGTH = 0.0
 
545
  interpolation=DEFAULT_INTERPOLATION,
546
  seed=42,
547
  upsample=False,
548
+ lora_1_strength=DEFAULT_LORA_1_STRENGTH,
549
  lora_a_strength=DEFAULT_LORA_A_STRENGTH,
550
  lora_b_strength=DEFAULT_LORA_B_STRENGTH,
551
  lora_c_strength=DEFAULT_LORA_C_STRENGTH,
 
594
 
595
  # Every UI LoRA slider gets packed into one dict here — this is the only place a new LoRA's slider value
596
  # needs wiring in; `_generate`, `set_adapters`, and the report line below are all keyed off this dict.
597
+ lora_strengths = {"lora1": float(lora_1_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)}
598
 
599
  progress(0.1, desc=f"Denoising {int(steps)} steps at {width}x{height}, {num_frames} frames ...")
600
  call = (
 
737
  value=DEFAULT_STEPS,
738
  info="PlagueKind: 15-20 on the linear_quadratic grid.",
739
  )
740
+ lora_1_strength = gr.Slider(
741
+ label="Distilled LoRA",
742
+ minimum=0.0,
743
+ maximum=2.0,
744
+ step=0.05,
745
+ value=DEFAULT_LORA_1_STRENGTH,
746
+ )
747
  lora_a_strength = gr.Slider(
748
  label="Anthro Enhancer LoRA",
749
  minimum=0.0,
 
839
  interpolation,
840
  seed,
841
  upsample,
842
+ lora_1_strength,
843
  lora_a_strength,
844
  lora_b_strength,
845
  lora_c_strength,