Spaces:
Running on Zero
Running on Zero
Upload app.py
Browse files
app.py
CHANGED
|
@@ -75,6 +75,18 @@ DETAIL_LORA_FILE = os.environ.get(
|
|
| 75 |
)
|
| 76 |
DETAIL_LORA_SCALE = float(os.environ.get("H3_DETAIL_LORA_SCALE", "0.7"))
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
BLOWJOB_LORA_REPO = os.environ.get(
|
| 79 |
"H3_BLOWJOB_LORA_REPO",
|
| 80 |
"iamgroot1212/minimax-h3-loras",
|
|
@@ -579,6 +591,13 @@ def load_and_apply_extra_loras(transformer) -> list[str]:
|
|
| 579 |
"Perfect Eyes / Skin / Hands LoRA",
|
| 580 |
DETAIL_LORA_SCALE,
|
| 581 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 582 |
_apply_extra_lora(
|
| 583 |
transformer,
|
| 584 |
BLOWJOB_LORA_REPO,
|
|
@@ -620,8 +639,8 @@ def load_models() -> str | None:
|
|
| 620 |
lora_status = load_and_apply_lora(pipe.transformer)
|
| 621 |
print(f"[gen] {lora_status}", flush=True)
|
| 622 |
|
| 623 |
-
# Then fold the requested
|
| 624 |
-
#
|
| 625 |
for extra_status in load_and_apply_extra_loras(pipe.transformer):
|
| 626 |
print(f"[gen] {extra_status}", flush=True)
|
| 627 |
|
|
|
|
| 75 |
)
|
| 76 |
DETAIL_LORA_SCALE = float(os.environ.get("H3_DETAIL_LORA_SCALE", "0.7"))
|
| 77 |
|
| 78 |
+
# Spatial & Physics: object collisions, gravity, stacking, falling, occlusion, and
|
| 79 |
+
# more consistent spatial relationships. The pruned H3 adapter does not require a trigger word.
|
| 80 |
+
SPATIAL_LORA_REPO = os.environ.get(
|
| 81 |
+
"H3_SPATIAL_LORA_REPO",
|
| 82 |
+
"Jojocodex/minimax-h3-spatial-physics-lora",
|
| 83 |
+
)
|
| 84 |
+
SPATIAL_LORA_FILE = os.environ.get(
|
| 85 |
+
"H3_SPATIAL_LORA_FILE",
|
| 86 |
+
"wushu_spatial_physics_clean_3000_pruned.safetensors",
|
| 87 |
+
)
|
| 88 |
+
SPATIAL_LORA_SCALE = float(os.environ.get("H3_SPATIAL_LORA_SCALE", "0.4"))
|
| 89 |
+
|
| 90 |
BLOWJOB_LORA_REPO = os.environ.get(
|
| 91 |
"H3_BLOWJOB_LORA_REPO",
|
| 92 |
"iamgroot1212/minimax-h3-loras",
|
|
|
|
| 591 |
"Perfect Eyes / Skin / Hands LoRA",
|
| 592 |
DETAIL_LORA_SCALE,
|
| 593 |
),
|
| 594 |
+
_apply_extra_lora(
|
| 595 |
+
transformer,
|
| 596 |
+
SPATIAL_LORA_REPO,
|
| 597 |
+
SPATIAL_LORA_FILE,
|
| 598 |
+
"Spatial & Physics LoRA",
|
| 599 |
+
SPATIAL_LORA_SCALE,
|
| 600 |
+
),
|
| 601 |
_apply_extra_lora(
|
| 602 |
transformer,
|
| 603 |
BLOWJOB_LORA_REPO,
|
|
|
|
| 639 |
lora_status = load_and_apply_lora(pipe.transformer)
|
| 640 |
print(f"[gen] {lora_status}", flush=True)
|
| 641 |
|
| 642 |
+
# Then fold the requested extra LoRAs into the same transformer.
|
| 643 |
+
# They add their deltas on top of FlashGen.
|
| 644 |
for extra_status in load_and_apply_extra_loras(pipe.transformer):
|
| 645 |
print(f"[gen] {extra_status}", flush=True)
|
| 646 |
|