Update app.py
Browse files
app.py
CHANGED
|
@@ -274,7 +274,7 @@ print("Downloading LoRA for this Space (dagloop5/LoRA:LoRA2.safetensors)...")
|
|
| 274 |
lora_path = hf_hub_download(repo_id="dagloop5/LoRA", filename="LoRA2.safetensors")
|
| 275 |
# Create a descriptor object that the LTX loader expects.
|
| 276 |
# initial strength is set to 1.0; we'll mutate `.strength` at runtime from the UI slider.
|
| 277 |
-
lora_descriptor = LoraPathStrengthAndSDOps(lora_path,
|
| 278 |
|
| 279 |
print(f"LoRA: {lora_path}")
|
| 280 |
|
|
@@ -365,7 +365,7 @@ def on_highres_toggle(first_image, last_image, high_res):
|
|
| 365 |
return gr.update(value=w), gr.update(value=h)
|
| 366 |
|
| 367 |
|
| 368 |
-
@spaces.GPU(duration=
|
| 369 |
@torch.inference_mode()
|
| 370 |
def generate_video(
|
| 371 |
first_image,
|
|
@@ -378,7 +378,7 @@ def generate_video(
|
|
| 378 |
randomize_seed: bool = True,
|
| 379 |
height: int = 1024,
|
| 380 |
width: int = 1536,
|
| 381 |
-
lora_strength: float =
|
| 382 |
progress=gr.Progress(track_tqdm=True),
|
| 383 |
):
|
| 384 |
try:
|
|
@@ -582,7 +582,7 @@ with gr.Blocks(title="LTX-2.3 Heretic Distilled") as demo:
|
|
| 582 |
info="Scale for the LoRA weights (0.0 = off). Set near 1.0 for full effect.",
|
| 583 |
minimum=0.0,
|
| 584 |
maximum=2.0,
|
| 585 |
-
value=
|
| 586 |
step=0.01,
|
| 587 |
)
|
| 588 |
|
|
|
|
| 274 |
lora_path = hf_hub_download(repo_id="dagloop5/LoRA", filename="LoRA2.safetensors")
|
| 275 |
# Create a descriptor object that the LTX loader expects.
|
| 276 |
# initial strength is set to 1.0; we'll mutate `.strength` at runtime from the UI slider.
|
| 277 |
+
lora_descriptor = LoraPathStrengthAndSDOps(lora_path, 1.0, LTXV_LORA_COMFY_RENAMING_MAP)
|
| 278 |
|
| 279 |
print(f"LoRA: {lora_path}")
|
| 280 |
|
|
|
|
| 365 |
return gr.update(value=w), gr.update(value=h)
|
| 366 |
|
| 367 |
|
| 368 |
+
@spaces.GPU(duration=80)
|
| 369 |
@torch.inference_mode()
|
| 370 |
def generate_video(
|
| 371 |
first_image,
|
|
|
|
| 378 |
randomize_seed: bool = True,
|
| 379 |
height: int = 1024,
|
| 380 |
width: int = 1536,
|
| 381 |
+
lora_strength: float = 1.0,
|
| 382 |
progress=gr.Progress(track_tqdm=True),
|
| 383 |
):
|
| 384 |
try:
|
|
|
|
| 582 |
info="Scale for the LoRA weights (0.0 = off). Set near 1.0 for full effect.",
|
| 583 |
minimum=0.0,
|
| 584 |
maximum=2.0,
|
| 585 |
+
value=1.0,
|
| 586 |
step=0.01,
|
| 587 |
)
|
| 588 |
|