Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,12 +5,12 @@ Supports prompt enhancement for better results.
|
|
| 5 |
"""
|
| 6 |
import time
|
| 7 |
from pathlib import Path
|
| 8 |
-
|
| 9 |
import spaces
|
| 10 |
import gradio as gr
|
| 11 |
import torch
|
| 12 |
from huggingface_hub import hf_hub_download,snapshot_download
|
| 13 |
-
|
| 14 |
# Import from public LTX-2 package
|
| 15 |
# Install with: pip install git+https://github.com/Lightricks/LTX-2.git
|
| 16 |
from ltx_pipelines.utils import ModelLedger
|
|
@@ -180,12 +180,12 @@ with gr.Blocks(title="LTX-2 Gemma Text Encoder") as demo:
|
|
| 180 |
with gr.Accordion("Prompt Enhancement Settings", open=False):
|
| 181 |
input_image = gr.Image(
|
| 182 |
label="Reference Image (Optional)",
|
| 183 |
-
type="
|
| 184 |
)
|
| 185 |
enhancement_seed = gr.Slider(
|
| 186 |
label="Enhancement Seed",
|
| 187 |
minimum=0,
|
| 188 |
-
maximum=
|
| 189 |
value=42,
|
| 190 |
step=1,
|
| 191 |
info="Random seed for prompt enhancement"
|
|
|
|
| 5 |
"""
|
| 6 |
import time
|
| 7 |
from pathlib import Path
|
| 8 |
+
import numpy as np
|
| 9 |
import spaces
|
| 10 |
import gradio as gr
|
| 11 |
import torch
|
| 12 |
from huggingface_hub import hf_hub_download,snapshot_download
|
| 13 |
+
MAX_SEED = np.iinfo(np.int32).max
|
| 14 |
# Import from public LTX-2 package
|
| 15 |
# Install with: pip install git+https://github.com/Lightricks/LTX-2.git
|
| 16 |
from ltx_pipelines.utils import ModelLedger
|
|
|
|
| 180 |
with gr.Accordion("Prompt Enhancement Settings", open=False):
|
| 181 |
input_image = gr.Image(
|
| 182 |
label="Reference Image (Optional)",
|
| 183 |
+
type="filepath",
|
| 184 |
)
|
| 185 |
enhancement_seed = gr.Slider(
|
| 186 |
label="Enhancement Seed",
|
| 187 |
minimum=0,
|
| 188 |
+
maximum=MAX_SEED,
|
| 189 |
value=42,
|
| 190 |
step=1,
|
| 191 |
info="Random seed for prompt enhancement"
|