Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,9 @@ model_id = "DeepFloyd/t5-v1_1-xxl"
|
|
| 22 |
save_directory = "pretrained_models/t5_ckpts/t5-v1_1-xxl"
|
| 23 |
|
| 24 |
# Modeli indir
|
|
|
|
| 25 |
download_t5_model(model_id, save_directory)
|
|
|
|
| 26 |
|
| 27 |
def download_model(repo_id, model_name):
|
| 28 |
model_path = hf_hub_download(repo_id=repo_id, filename=model_name)
|
|
@@ -54,8 +56,10 @@ def run_inference(model_name, prompt_text):
|
|
| 54 |
}
|
| 55 |
|
| 56 |
config_path = config_mapping[model_name]
|
|
|
|
| 57 |
ckpt_path = download_model(repo_id, model_name)
|
| 58 |
-
|
|
|
|
| 59 |
# Save prompt_text to a temporary text file
|
| 60 |
prompt_file = tempfile.NamedTemporaryFile(delete=False, suffix=".txt", mode='w')
|
| 61 |
prompt_file.write(prompt_text)
|
|
|
|
| 22 |
save_directory = "pretrained_models/t5_ckpts/t5-v1_1-xxl"
|
| 23 |
|
| 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)
|
|
|
|
| 56 |
}
|
| 57 |
|
| 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')
|
| 65 |
prompt_file.write(prompt_text)
|