Spaces:
Running
on
L40S
Running
on
L40S
Commit
·
13abc4d
1
Parent(s):
9430e15
hmm
Browse files
app.py
CHANGED
@@ -158,7 +158,7 @@ with gr.Blocks(title="ReCamMaster") as demo:
|
|
158 |
|
159 |
This is a demo of [ReCamMaster](https://jianhongbai.github.io/ReCamMaster/), an amazing model that allows you to reshoot any video!
|
160 |
|
161 |
-
Due to the long generation times (~ 10 min) this space [should be duplicated](https://huggingface.co/spaces/jbilcke-hf/ReCamMaster?duplicate=true) to your own account for the best experience (please select at least a Nvidia L40S).
|
162 |
|
163 |
{demo_notice}
|
164 |
""")
|
@@ -167,26 +167,26 @@ with gr.Blocks(title="ReCamMaster") as demo:
|
|
167 |
with gr.Column():
|
168 |
# Video input section
|
169 |
with gr.Group():
|
170 |
-
gr.Markdown("###
|
171 |
-
video_input = gr.Video(label="
|
172 |
text_prompt = gr.Textbox(
|
173 |
-
label="
|
174 |
placeholder="A person walking in the street",
|
175 |
value="A dynamic scene"
|
176 |
)
|
177 |
|
178 |
# Camera selection
|
179 |
with gr.Group():
|
180 |
-
gr.Markdown("###
|
181 |
camera_type = gr.Radio(
|
182 |
choices=[(v, k) for k, v in CAMERA_TRANSFORMATIONS.items()],
|
183 |
-
label="
|
184 |
value="1"
|
185 |
)
|
186 |
|
187 |
# Video settings
|
188 |
with gr.Group():
|
189 |
-
gr.Markdown("###
|
190 |
num_frames = gr.Slider(
|
191 |
minimum=17,
|
192 |
maximum=81, # MAX_FRAMES,
|
@@ -208,10 +208,7 @@ with gr.Blocks(title="ReCamMaster") as demo:
|
|
208 |
# right now the rest of the code doesn't support changing it, so..
|
209 |
visible=False
|
210 |
)
|
211 |
-
|
212 |
-
# Advanced settings
|
213 |
-
with gr.Group():
|
214 |
-
gr.Markdown("### Step 4: Advanced Settings")
|
215 |
with gr.Row():
|
216 |
seed = gr.Slider(
|
217 |
label="Seed",
|
@@ -232,7 +229,7 @@ with gr.Blocks(title="ReCamMaster") as demo:
|
|
232 |
value=min(30, MAX_INFERENCE_STEPS),
|
233 |
step=1,
|
234 |
label="Inference Steps",
|
235 |
-
info=f"
|
236 |
)
|
237 |
cfg_scale = gr.Slider(
|
238 |
minimum=0.0,
|
@@ -244,11 +241,11 @@ with gr.Blocks(title="ReCamMaster") as demo:
|
|
244 |
)
|
245 |
|
246 |
# Generate button
|
247 |
-
generate_btn = gr.Button("Generate
|
248 |
|
249 |
with gr.Column():
|
250 |
# Output section
|
251 |
-
output_video = gr.Video(label="
|
252 |
status_output = gr.Textbox(label="Status", interactive=False)
|
253 |
|
254 |
# Event handlers
|
|
|
158 |
|
159 |
This is a demo of [ReCamMaster](https://jianhongbai.github.io/ReCamMaster/), an amazing model that allows you to reshoot any video!
|
160 |
|
161 |
+
Due to the long generation times (~ 10 min for 50 steps of 81 frames) this space has be artificially limited to 25 steps, and [should be duplicated](https://huggingface.co/spaces/jbilcke-hf/ReCamMaster?duplicate=true) to your own account for the best experience (please select at least a Nvidia L40S).
|
162 |
|
163 |
{demo_notice}
|
164 |
""")
|
|
|
167 |
with gr.Column():
|
168 |
# Video input section
|
169 |
with gr.Group():
|
170 |
+
gr.Markdown("### 1. Upload a video (about ~3 sec long)")
|
171 |
+
video_input = gr.Video(label="Video file of webcam clip")
|
172 |
text_prompt = gr.Textbox(
|
173 |
+
label="Describe the scene",
|
174 |
placeholder="A person walking in the street",
|
175 |
value="A dynamic scene"
|
176 |
)
|
177 |
|
178 |
# Camera selection
|
179 |
with gr.Group():
|
180 |
+
gr.Markdown("### 2. Decide how to reshoot the scene")
|
181 |
camera_type = gr.Radio(
|
182 |
choices=[(v, k) for k, v in CAMERA_TRANSFORMATIONS.items()],
|
183 |
+
label="New camera angle and movement",
|
184 |
value="1"
|
185 |
)
|
186 |
|
187 |
# Video settings
|
188 |
with gr.Group():
|
189 |
+
gr.Markdown("### 3. (Optional) Tweak some settings")
|
190 |
num_frames = gr.Slider(
|
191 |
minimum=17,
|
192 |
maximum=81, # MAX_FRAMES,
|
|
|
208 |
# right now the rest of the code doesn't support changing it, so..
|
209 |
visible=False
|
210 |
)
|
211 |
+
|
|
|
|
|
|
|
212 |
with gr.Row():
|
213 |
seed = gr.Slider(
|
214 |
label="Seed",
|
|
|
229 |
value=min(30, MAX_INFERENCE_STEPS),
|
230 |
step=1,
|
231 |
label="Inference Steps",
|
232 |
+
info=f"50 steps are recommended but slower{' (demo is limited to 25, duplicate to remove the limit)' if IS_DEMO else ''}"
|
233 |
)
|
234 |
cfg_scale = gr.Slider(
|
235 |
minimum=0.0,
|
|
|
241 |
)
|
242 |
|
243 |
# Generate button
|
244 |
+
generate_btn = gr.Button("Generate (will take 6~10 min)", variant="primary")
|
245 |
|
246 |
with gr.Column():
|
247 |
# Output section
|
248 |
+
output_video = gr.Video(label="Modified video")
|
249 |
status_output = gr.Textbox(label="Status", interactive=False)
|
250 |
|
251 |
# Event handlers
|