Spaces:
Runtime error
Runtime error
zR
commited on
Commit
·
04d446a
1
Parent(s):
5bc61d5
horse ready
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
"""
|
| 2 |
THis is the main file for the gradio web demo. It uses the CogVideoX-5B model to generate videos gradio web demo.
|
| 3 |
set environment variable OPENAI_API_KEY to use the OpenAI API to enhance the prompt.
|
| 4 |
|
|
@@ -53,7 +53,7 @@ pipe_video = CogVideoXVideoToVideoPipeline.from_pretrained(
|
|
| 53 |
).to(device)
|
| 54 |
|
| 55 |
pipe_image = CogVideoXImageToVideoPipeline.from_pretrained(
|
| 56 |
-
"THUDM/CogVideoX-5b",
|
| 57 |
transformer=CogVideoXTransformer3DModel.from_pretrained(
|
| 58 |
"THUDM/CogVideoX-5b-I2V", subfolder="transformer", torch_dtype=torch.bfloat16
|
| 59 |
),
|
|
@@ -294,7 +294,7 @@ def delete_old_files():
|
|
| 294 |
|
| 295 |
|
| 296 |
threading.Thread(target=delete_old_files, daemon=True).start()
|
| 297 |
-
examples_videos = [["example_videos/
|
| 298 |
examples_images = [["example_images/beach.png"], ["example_images/street.png"], ["example_images/camping.png"]]
|
| 299 |
|
| 300 |
with gr.Blocks() as demo:
|
|
@@ -303,7 +303,8 @@ with gr.Blocks() as demo:
|
|
| 303 |
CogVideoX-5B Huggingface Space🤗
|
| 304 |
</div>
|
| 305 |
<div style="text-align: center;">
|
| 306 |
-
<a href="https://huggingface.co/THUDM/CogVideoX-5B">🤗 5B Model Hub</a> |
|
|
|
|
| 307 |
<a href="https://github.com/THUDM/CogVideo">🌐 Github</a> |
|
| 308 |
<a href="https://arxiv.org/pdf/2408.06072">📜 arxiv </a>
|
| 309 |
</div>
|
|
|
|
| 1 |
+
`"""
|
| 2 |
THis is the main file for the gradio web demo. It uses the CogVideoX-5B model to generate videos gradio web demo.
|
| 3 |
set environment variable OPENAI_API_KEY to use the OpenAI API to enhance the prompt.
|
| 4 |
|
|
|
|
| 53 |
).to(device)
|
| 54 |
|
| 55 |
pipe_image = CogVideoXImageToVideoPipeline.from_pretrained(
|
| 56 |
+
"THUDM/CogVideoX-5b-I2V",
|
| 57 |
transformer=CogVideoXTransformer3DModel.from_pretrained(
|
| 58 |
"THUDM/CogVideoX-5b-I2V", subfolder="transformer", torch_dtype=torch.bfloat16
|
| 59 |
),
|
|
|
|
| 294 |
|
| 295 |
|
| 296 |
threading.Thread(target=delete_old_files, daemon=True).start()
|
| 297 |
+
examples_videos = [["example_videos/horse.mp4"], ["example_videos/kitten.mp4"], ["example_videos/train_running.mp4"]]
|
| 298 |
examples_images = [["example_images/beach.png"], ["example_images/street.png"], ["example_images/camping.png"]]
|
| 299 |
|
| 300 |
with gr.Blocks() as demo:
|
|
|
|
| 303 |
CogVideoX-5B Huggingface Space🤗
|
| 304 |
</div>
|
| 305 |
<div style="text-align: center;">
|
| 306 |
+
<a href="https://huggingface.co/THUDM/CogVideoX-5B">🤗 5B(T2V) Model Hub</a> |
|
| 307 |
+
<a href="https://huggingface.co/THUDM/CogVideoX-5B-I2V">🤗 5B(I2V) Model Hub</a> |
|
| 308 |
<a href="https://github.com/THUDM/CogVideo">🌐 Github</a> |
|
| 309 |
<a href="https://arxiv.org/pdf/2408.06072">📜 arxiv </a>
|
| 310 |
</div>
|