sandeshrajx commited on
Commit
171f520
·
verified ·
1 Parent(s): 688f5da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -24,7 +24,7 @@ save_directory = "pretrained_models/t5_ckpts/t5-v1_1-xxl"
24
  # Modeli indir
25
  st_time_t5 = time.time()
26
  download_t5_model(model_id, save_directory)
27
- print(f"T5 Download Time : {st_time_t5-time.time()} seconds")
28
 
29
  def download_model(repo_id, model_name):
30
  model_path = hf_hub_download(repo_id=repo_id, filename=model_name)
@@ -32,7 +32,7 @@ def download_model(repo_id, model_name):
32
 
33
  import glob
34
 
35
- @spaces.GPU(duration=1500)
36
  def run_model(temp_config_path, ckpt_path):
37
  start_time = time.time() # Record the start time
38
  cmd = [
@@ -58,7 +58,7 @@ def run_inference(model_name, prompt_text):
58
  config_path = config_mapping[model_name]
59
  st_time_sora = time.time()
60
  ckpt_path = download_model(repo_id, model_name)
61
- print(f"Open-Sora Download Time : {st_time_sora-time.time()} seconds")
62
 
63
  # Save prompt_text to a temporary text file
64
  prompt_file = tempfile.NamedTemporaryFile(delete=False, suffix=".txt", mode='w')
 
24
  # Modeli indir
25
  st_time_t5 = time.time()
26
  download_t5_model(model_id, save_directory)
27
+ print(f"T5 Download Time : {time.time()-st_time_t5} seconds")
28
 
29
  def download_model(repo_id, model_name):
30
  model_path = hf_hub_download(repo_id=repo_id, filename=model_name)
 
32
 
33
  import glob
34
 
35
+ @spaces.GPU(duration=500)
36
  def run_model(temp_config_path, ckpt_path):
37
  start_time = time.time() # Record the start time
38
  cmd = [
 
58
  config_path = config_mapping[model_name]
59
  st_time_sora = time.time()
60
  ckpt_path = download_model(repo_id, model_name)
61
+ print(f"Open-Sora Download Time : {time.time()-st_time_sora} seconds")
62
 
63
  # Save prompt_text to a temporary text file
64
  prompt_file = tempfile.NamedTemporaryFile(delete=False, suffix=".txt", mode='w')