Spaces:
Runtime error
Runtime error
watchtowerss
commited on
Commit
·
8bd6fab
1
Parent(s):
23d6e96
Update app.py
Browse files
app.py
CHANGED
@@ -336,11 +336,12 @@ def inpaint_video(video_state, interactive_state, mask_dropdown):
|
|
336 |
|
337 |
try:
|
338 |
inpainted_frames = model.baseinpainter.inpaint(frames, inpaint_masks, ratio=interactive_state["resize_ratio"]) # numpy array, T, H, W, 3
|
|
|
339 |
except:
|
340 |
operation_log = [("Error! You are trying to inpaint without masks input. Please track the selected mask first, and then press inpaint. If VRAM exceeded, please use the resize ratio to scaling down the image size.","Error"), ("","")]
|
341 |
inpainted_frames = video_state["origin_images"]
|
342 |
video_output = generate_video_from_frames(inpainted_frames, output_path="./result/inpaint/{}".format(video_state["video_name"]), fps=fps) # import video_input to name the output video
|
343 |
-
|
344 |
return video_output, operation_log
|
345 |
|
346 |
|
|
|
336 |
|
337 |
try:
|
338 |
inpainted_frames = model.baseinpainter.inpaint(frames, inpaint_masks, ratio=interactive_state["resize_ratio"]) # numpy array, T, H, W, 3
|
339 |
+
video_output = generate_video_from_paintedframes(inpainted_frames, output_path="./result/inpaint/{}".format(video_state["video_name"]), fps=fps)
|
340 |
except:
|
341 |
operation_log = [("Error! You are trying to inpaint without masks input. Please track the selected mask first, and then press inpaint. If VRAM exceeded, please use the resize ratio to scaling down the image size.","Error"), ("","")]
|
342 |
inpainted_frames = video_state["origin_images"]
|
343 |
video_output = generate_video_from_frames(inpainted_frames, output_path="./result/inpaint/{}".format(video_state["video_name"]), fps=fps) # import video_input to name the output video
|
344 |
+
|
345 |
return video_output, operation_log
|
346 |
|
347 |
|