Spaces:
Paused
Paused
add examples references
Browse files
app.py
CHANGED
@@ -100,25 +100,25 @@ with gr.Blocks(theme=gr.themes.Soft(), css="footer {display: none !important}")
|
|
100 |
"""
|
101 |
)
|
102 |
gr.Markdown("A Lightweight and Plug-and-Play Identity Control for Video Generation")
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
|
123 |
with gr.Row():
|
124 |
with gr.Column(scale=1):
|
@@ -170,12 +170,56 @@ with gr.Blocks(theme=gr.themes.Soft(), css="footer {display: none !important}")
|
|
170 |
|
171 |
generate_btn = gr.Button("Generate Video", variant="primary")
|
172 |
|
|
|
173 |
with gr.Column(scale=1):
|
174 |
gr.Markdown("### 3. View Generated Result")
|
175 |
output_video = gr.Video(
|
176 |
label="Generated Video",
|
177 |
height=480,
|
178 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
generate_btn.click(
|
180 |
fn=generate_video,
|
181 |
inputs=[
|
@@ -188,7 +232,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css="footer {display: none !important}")
|
|
188 |
output_quality,
|
189 |
],
|
190 |
outputs=output_video,
|
191 |
-
api_name="generate_video",
|
192 |
)
|
193 |
|
194 |
if __name__ == "__main__":
|
|
|
100 |
"""
|
101 |
)
|
102 |
gr.Markdown("A Lightweight and Plug-and-Play Identity Control for Video Generation")
|
103 |
+
gr.HTML("""
|
104 |
+
<div style="display:flex;column-gap:4px;">
|
105 |
+
<a href="https://github.com/WeChatCV/Stand-In">
|
106 |
+
<img src='https://img.shields.io/badge/GitHub-Repo-blue'>
|
107 |
+
</a>
|
108 |
+
<a href="https://stand-in-video.github.io/">
|
109 |
+
<img src='https://img.shields.io/badge/Project-Page-green'>
|
110 |
+
</a>
|
111 |
+
<a href="https://arxiv.org/abs/2508.07901">
|
112 |
+
<img src='https://img.shields.io/badge/ArXiv-Paper-red'>
|
113 |
+
</a>
|
114 |
+
<a href="https://huggingface.co/spaces/fffiloni/Stand-In?duplicate=true">
|
115 |
+
<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-sm.svg" alt="Duplicate this Space">
|
116 |
+
</a>
|
117 |
+
<a href="https://huggingface.co/fffiloni">
|
118 |
+
<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/follow-me-on-HF-sm-dark.svg" alt="Follow me on HF">
|
119 |
+
</a>
|
120 |
+
</div>
|
121 |
+
""")
|
122 |
|
123 |
with gr.Row():
|
124 |
with gr.Column(scale=1):
|
|
|
170 |
|
171 |
generate_btn = gr.Button("Generate Video", variant="primary")
|
172 |
|
173 |
+
|
174 |
with gr.Column(scale=1):
|
175 |
gr.Markdown("### 3. View Generated Result")
|
176 |
output_video = gr.Video(
|
177 |
label="Generated Video",
|
178 |
height=480,
|
179 |
)
|
180 |
+
|
181 |
+
examples = gr.Examples(
|
182 |
+
examples = [
|
183 |
+
[
|
184 |
+
"./examples/standin_example_1.png",
|
185 |
+
"In a corridor where the walls ripple like water, a woman reaches out to touch the flowing surface, causing circles of ripples to spread. The camera moves from a medium shot to a close-up, capturing her curious expression as she sees her distorted reflection.",
|
186 |
+
0,
|
187 |
+
"Vibrant colors, overexposure, static, blurred details, subtitles, style, artwork, painting, still image, overall grayness, worst quality, low quality, JPEG compression residue, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still image, cluttered background, three legs, crowded background, walking backwards",
|
188 |
+
20,
|
189 |
+
25, 9
|
190 |
+
],
|
191 |
+
[
|
192 |
+
"./examples/standin_example_4.png",
|
193 |
+
"A man in a white lab coat stands in front of a laboratory bench. Having just completed a critical step, he turns toward the camera, his eyes shining with the excitement of discovery. The background is filled with precise instruments and an array of beakers and test tubes, capturing the rigor and allure of scientific exploration.",
|
194 |
+
0,
|
195 |
+
"Vibrant colors, overexposure, static, blurred details, subtitles, style, artwork, painting, still image, overall grayness, worst quality, low quality, JPEG compression residue, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still image, cluttered background, three legs, crowded background, walking backwards",
|
196 |
+
20,
|
197 |
+
25, 9
|
198 |
+
],
|
199 |
+
[
|
200 |
+
"./examples/standin_example_8.png",
|
201 |
+
"The video features a man standing at an easel, focused intently as his brush dances across the canvas. His expression is one of deep concentration, with a hint of satisfaction as each brushstroke adds color and form. He wears a paint-splattered apron, and his hands move with confident precision. The setting, filled with scattered art supplies, open paint tubes, and unfinished sketches pinned to the wall, suggests an artist's studio. A large window on one side allows sunlight to stream in, casting a soft glow across the room and illuminating the colors on his canvas. The atmosphere is creative and inspired, with the man's intense focus and the lively colors on the canvas indicating a moment of artistic passion and expression.",
|
202 |
+
0,
|
203 |
+
"Vibrant colors, overexposure, static, blurred details, subtitles, style, artwork, painting, still image, overall grayness, worst quality, low quality, JPEG compression residue, ugly, mutilated, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still image, cluttered background, three legs, crowded background, walking backwards",
|
204 |
+
20,
|
205 |
+
25, 9
|
206 |
+
]
|
207 |
+
],
|
208 |
+
fn=generate_video,
|
209 |
+
inputs=[
|
210 |
+
input_image,
|
211 |
+
input_prompt,
|
212 |
+
input_seed,
|
213 |
+
input_negative_prompt,
|
214 |
+
input_steps,
|
215 |
+
output_fps,
|
216 |
+
output_quality,
|
217 |
+
],
|
218 |
+
outputs=output_video,
|
219 |
+
cache_examples=True,
|
220 |
+
cache_mode="lazy"
|
221 |
+
)
|
222 |
+
|
223 |
generate_btn.click(
|
224 |
fn=generate_video,
|
225 |
inputs=[
|
|
|
232 |
output_quality,
|
233 |
],
|
234 |
outputs=output_video,
|
235 |
+
#api_name="generate_video",
|
236 |
)
|
237 |
|
238 |
if __name__ == "__main__":
|