Spaces:
Running
Running
bertjiazheng
commited on
Commit
•
5f8d899
1
Parent(s):
09f1eaa
add KoolCogVideoX
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
emoji: 🎥
|
4 |
colorFrom: yellow
|
5 |
colorTo: green
|
@@ -10,8 +10,8 @@ suggested_storage: large
|
|
10 |
app_port: 7860
|
11 |
app_file: app.py
|
12 |
models:
|
13 |
-
-
|
14 |
-
-
|
15 |
tags:
|
16 |
- cogvideox
|
17 |
- video-generation
|
|
|
1 |
---
|
2 |
+
title: KoolCogVideoX
|
3 |
emoji: 🎥
|
4 |
colorFrom: yellow
|
5 |
colorTo: green
|
|
|
10 |
app_port: 7860
|
11 |
app_file: app.py
|
12 |
models:
|
13 |
+
- bertjiazheng/KoolCogVideoX-2b
|
14 |
+
- bertjiazheng/KoolCogVideoX-2b
|
15 |
tags:
|
16 |
- cogvideox
|
17 |
- video-generation
|
app.py
CHANGED
@@ -10,6 +10,7 @@ import spaces
|
|
10 |
|
11 |
from videosys import CogVideoXConfig, CogVideoXPABConfig, VideoSysEngine
|
12 |
|
|
|
13 |
|
14 |
def load_model(model_name, enable_video_sys=False, pab_threshold=[100, 850], pab_range=2):
|
15 |
pab_config = CogVideoXPABConfig(spatial_threshold=pab_threshold, spatial_range=pab_range)
|
@@ -131,29 +132,27 @@ with gr.Blocks(css=css) as demo:
|
|
131 |
gr.HTML(
|
132 |
"""
|
133 |
<div style="text-align: center; font-size: 32px; font-weight: bold; margin-bottom: 20px;">
|
134 |
-
|
|
|
|
|
|
|
|
|
135 |
</div>
|
136 |
<div style="text-align: center; font-size: 15px;">
|
137 |
-
|
138 |
-
|
139 |
-
⚠️ This demo is for academic research and experiential use only.
|
140 |
-
Users should strictly adhere to local laws and ethics.<br>
|
141 |
-
|
142 |
-
💡 This demo only demonstrates single-device inference. To experience the full power of VideoSys, please deploy it with multiple devices.<br><br>
|
143 |
-
</div>
|
144 |
</div>
|
145 |
"""
|
146 |
)
|
147 |
|
148 |
with gr.Row():
|
149 |
with gr.Column():
|
150 |
-
prompt = gr.Textbox(label="Prompt (Less than 200 Words)", value=
|
151 |
|
152 |
with gr.Column():
|
153 |
gr.Markdown("**Generation Parameters**<br>")
|
154 |
with gr.Row():
|
155 |
model_name = gr.Radio(
|
156 |
-
["
|
157 |
)
|
158 |
with gr.Row():
|
159 |
num_inference_steps = gr.Slider(label="Inference Steps", maximum=50, value=50)
|
@@ -191,6 +190,43 @@ with gr.Blocks(css=css) as demo:
|
|
191 |
with gr.Row():
|
192 |
video_output_vs = gr.Video(label="CogVideoX with VideoSys", width=720, height=480)
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
generate_button_vs.click(
|
195 |
generate_vs,
|
196 |
inputs=[
|
|
|
10 |
|
11 |
from videosys import CogVideoXConfig, CogVideoXPABConfig, VideoSysEngine
|
12 |
|
13 |
+
PROMPT = "A modern living room with a minimalist design, featuring a large window, a white ceiling, and a wooden floor. The room is furnished with a white sofa, a gray ottoman, a wooden table, and a hanging light. The space is well-lit and has a clean, contemporary aesthetic."
|
14 |
|
15 |
def load_model(model_name, enable_video_sys=False, pab_threshold=[100, 850], pab_range=2):
|
16 |
pab_config = CogVideoXPABConfig(spatial_threshold=pab_threshold, spatial_range=pab_range)
|
|
|
132 |
gr.HTML(
|
133 |
"""
|
134 |
<div style="text-align: center; font-size: 32px; font-weight: bold; margin-bottom: 20px;">
|
135 |
+
KoolCogVideoX Huggingface Space🤗
|
136 |
+
</div>
|
137 |
+
<div style="text-align: center; font-size: 15px; margin-bottom: 20px;">
|
138 |
+
KoolCogVideoX is fine-tuned on <a href="https://huggingface.co/collections/THUDM/cogvideo-66c08e62f1685a3ade464cce">CogVideoX</a> specifically for interior design scenarios.<br>
|
139 |
+
The demo is powered by <a href="https://github.com/NUS-HPC-AI-Lab/VideoSys">https://github.com/NUS-HPC-AI-Lab/VideoSys</a>.
|
140 |
</div>
|
141 |
<div style="text-align: center; font-size: 15px;">
|
142 |
+
⚠️ This demo is for academic research and experiential use only. Users should strictly adhere to local laws and ethics.
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
</div>
|
144 |
"""
|
145 |
)
|
146 |
|
147 |
with gr.Row():
|
148 |
with gr.Column():
|
149 |
+
prompt = gr.Textbox(label="Prompt (Less than 200 Words)", value=PROMPT, lines=2)
|
150 |
|
151 |
with gr.Column():
|
152 |
gr.Markdown("**Generation Parameters**<br>")
|
153 |
with gr.Row():
|
154 |
model_name = gr.Radio(
|
155 |
+
["bertjiazheng/KoolCogVideoX-2b", "bertjiazheng/KoolCogVideoX-5b"], label="Model Type", value="bertjiazheng/KoolCogVideoX-5b"
|
156 |
)
|
157 |
with gr.Row():
|
158 |
num_inference_steps = gr.Slider(label="Inference Steps", maximum=50, value=50)
|
|
|
190 |
with gr.Row():
|
191 |
video_output_vs = gr.Video(label="CogVideoX with VideoSys", width=720, height=480)
|
192 |
|
193 |
+
gr.Markdown("""
|
194 |
+
<table border="0" style="width: 100%; text-align: left; margin-top: 20px;">
|
195 |
+
<div style="text-align: center; font-size: 32px; font-weight: bold; margin-bottom: 20px;">
|
196 |
+
🎥 Video Gallery
|
197 |
+
</div>
|
198 |
+
<tr>
|
199 |
+
<td style="width: 25%; vertical-align: top; font-size: 0.9em;">
|
200 |
+
<p>A modern living room with a minimalist design, featuring a white sofa, a marble coffee table, a geometric painting, and a chandelier hanging from the ceiling. The room is well-lit with natural light, and the color scheme is neutral with accents of gold and black. The furniture is arranged in a way that creates a comfortable and inviting space.
|
201 |
+
</p>
|
202 |
+
</td>
|
203 |
+
<td style="width: 25%; vertical-align: top;">
|
204 |
+
<video src="https://manycore-research-azure.kujiale.com/manycore-research/KoolCogVideoX-5b/L3D386S81B20ENDPDZEFIAUWJLWGLUFX7LB6KY8.mp4" width="100%" controls autoplay loop></video>
|
205 |
+
</td>
|
206 |
+
<td style="width: 25%; vertical-align: top; font-size: 0.9em;">
|
207 |
+
<p>A modern living room with a minimalist design, featuring a large window, a white ceiling, and a wooden floor. The room is furnished with a white sofa, a gray ottoman, a wooden table, and a hanging light. The space is well-lit and has a clean, contemporary aesthetic.</p>
|
208 |
+
</td>
|
209 |
+
<td style="width: 25%; vertical-align: top;">
|
210 |
+
<video src="https://manycore-research-azure.kujiale.com/manycore-research/KoolCogVideoX-5b/L3D489S267B0ENDPN7LV6QUWLYIALUFX4RSVTA8.mp4" width="100%" controls autoplay loop></video>
|
211 |
+
</td>
|
212 |
+
</tr>
|
213 |
+
<tr>
|
214 |
+
<td style="width: 25%; vertical-align: top; font-size: 0.9em;">
|
215 |
+
<p>A modern bedroom with a minimalist design, featuring a large bed with a gray comforter and a blue blanket, a white dresser with a mirror, and a white closet. The room is decorated with framed artwork and a black and white poster on the wall. The floor is made of light wood, and the room has a clean and contemporary feel.</p>
|
216 |
+
</td>
|
217 |
+
<td style="width: 25%; vertical-align: top;">
|
218 |
+
<video src="https://manycore-research-azure.kujiale.com/manycore-research/KoolCogVideoX-5b/L3D943S369B0ENDPNXSMXYUWLGWQLUFX6ZZZWA8.mp4" width="100%" controls autoplay loop></video>
|
219 |
+
</td>
|
220 |
+
<td style="width: 25%; vertical-align: top; font-size: 0.9em;">
|
221 |
+
<p>A modern kitchen with a sleek design, featuring a marble countertop, stainless steel appliances, and a variety of bottles and glasses. The kitchen is well-lit with recessed lighting and has a contemporary aesthetic.</p>
|
222 |
+
</td>
|
223 |
+
<td style="width: 25%; vertical-align: top;">
|
224 |
+
<video src="https://manycore-research-azure.kujiale.com/manycore-research/KoolCogVideoX-5b/L3D670S366B0ENDPOAJ4LQUWJN2ILUFX5GLPRQ8.mp4" width="100%" controls autoplay loop></video>
|
225 |
+
</td>
|
226 |
+
</tr>
|
227 |
+
</table>
|
228 |
+
""")
|
229 |
+
|
230 |
generate_button_vs.click(
|
231 |
generate_vs,
|
232 |
inputs=[
|