linoyts HF Staff commited on
Commit
4d91017
·
verified ·
1 Parent(s): 79d0df8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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="pil",
184
  )
185
  enhancement_seed = gr.Slider(
186
  label="Enhancement Seed",
187
  minimum=0,
188
- maximum=10000,
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"