Spaces:
Sleeping
Sleeping
Anonymous
commited on
Commit
·
676db20
1
Parent(s):
2afd1df
add 512
Browse files
app.py
CHANGED
|
@@ -34,7 +34,11 @@ def infer(prompt, output_size, seed, num_frames, ddim_steps, unconditional_guida
|
|
| 34 |
if not os.path.exists(ckpt_path_512):
|
| 35 |
os.makedirs(ckpt_dir_512, exist_ok=True)
|
| 36 |
hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model_512.ckpt", local_dir=ckpt_dir_512)
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
model_512.eval()
|
| 39 |
model = model_512
|
| 40 |
fps = 8
|
|
@@ -51,7 +55,11 @@ def infer(prompt, output_size, seed, num_frames, ddim_steps, unconditional_guida
|
|
| 51 |
if not os.path.exists(ckpt_path_1024):
|
| 52 |
os.makedirs(ckpt_dir_1024, exist_ok=True)
|
| 53 |
hf_hub_download(repo_id="VideoCrafter/Text2Video-1024", filename="model.ckpt", local_dir=ckpt_dir_1024)
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
model_1024.eval()
|
| 56 |
model = model_1024
|
| 57 |
fps = 28
|
|
@@ -69,7 +77,11 @@ def infer(prompt, output_size, seed, num_frames, ddim_steps, unconditional_guida
|
|
| 69 |
# if not os.path.exists(ckpt_path_256):
|
| 70 |
# os.makedirs(ckpt_dir_256, exist_ok=True)
|
| 71 |
# hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model_256.pth", local_dir=ckpt_dir_256)
|
| 72 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
# model_256.eval()
|
| 74 |
# model = model_256
|
| 75 |
# fps = 8
|
|
@@ -262,8 +274,10 @@ with gr.Blocks(css=css) as demo:
|
|
| 262 |
Tuning-Free Longer Video Diffusion via Noise Rescheduling
|
| 263 |
</p>
|
| 264 |
<p style="text-align: center;">
|
| 265 |
-
|
| 266 |
-
</
|
|
|
|
|
|
|
| 267 |
"""
|
| 268 |
)
|
| 269 |
|
|
|
|
| 34 |
if not os.path.exists(ckpt_path_512):
|
| 35 |
os.makedirs(ckpt_dir_512, exist_ok=True)
|
| 36 |
hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model_512.ckpt", local_dir=ckpt_dir_512)
|
| 37 |
+
try:
|
| 38 |
+
model_512 = load_model_checkpoint(model_512, ckpt_path_512)
|
| 39 |
+
except:
|
| 40 |
+
hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model_512.ckpt", local_dir=ckpt_dir_512, force_download=True)
|
| 41 |
+
model_512 = load_model_checkpoint(model_512, ckpt_path_512)
|
| 42 |
model_512.eval()
|
| 43 |
model = model_512
|
| 44 |
fps = 8
|
|
|
|
| 55 |
if not os.path.exists(ckpt_path_1024):
|
| 56 |
os.makedirs(ckpt_dir_1024, exist_ok=True)
|
| 57 |
hf_hub_download(repo_id="VideoCrafter/Text2Video-1024", filename="model.ckpt", local_dir=ckpt_dir_1024)
|
| 58 |
+
try:
|
| 59 |
+
model_1024 = load_model_checkpoint(model_1024, ckpt_path_1024)
|
| 60 |
+
except:
|
| 61 |
+
hf_hub_download(repo_id="VideoCrafter/Text2Video-1024", filename="model.ckpt", local_dir=ckpt_dir_1024, force_download=True)
|
| 62 |
+
model_1024 = load_model_checkpoint(model_1024, ckpt_path_1024)
|
| 63 |
model_1024.eval()
|
| 64 |
model = model_1024
|
| 65 |
fps = 28
|
|
|
|
| 77 |
# if not os.path.exists(ckpt_path_256):
|
| 78 |
# os.makedirs(ckpt_dir_256, exist_ok=True)
|
| 79 |
# hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model_256.pth", local_dir=ckpt_dir_256)
|
| 80 |
+
# try:
|
| 81 |
+
# model_256 = load_model_checkpoint(model_256, ckpt_path_256)
|
| 82 |
+
# except:
|
| 83 |
+
# hf_hub_download(repo_id="MoonQiu/LongerCrafter", filename="model_256.pth", local_dir=ckpt_dir_256, force_download=True)
|
| 84 |
+
# model_256 = load_model_checkpoint(model_256, ckpt_path_256)
|
| 85 |
# model_256.eval()
|
| 86 |
# model = model_256
|
| 87 |
# fps = 8
|
|
|
|
| 274 |
Tuning-Free Longer Video Diffusion via Noise Rescheduling
|
| 275 |
</p>
|
| 276 |
<p style="text-align: center;">
|
| 277 |
+
<a href="http://haonanqiu.com/projects/FreeNoise.html" target="_blank"><b>[Project Page]</b></a>
|
| 278 |
+
<a href="https://arxiv.org/abs/2310.15169" target="_blank"><b>[arXiv]</b></a>
|
| 279 |
+
<a href="https://github.com/arthur-qiu/LongerCrafter" target="_blank"><b>[Code]</b></a>
|
| 280 |
+
</p>
|
| 281 |
"""
|
| 282 |
)
|
| 283 |
|