Update gradio_app.py
Browse files- gradio_app.py +3 -3
gradio_app.py
CHANGED
@@ -64,7 +64,7 @@ def extract_frames(video_path):
|
|
64 |
# εη»γγ‘γ€γ«γθͺγΏθΎΌγ
|
65 |
cap = cv2.VideoCapture(video_path)
|
66 |
|
67 |
-
frame_list = []
|
68 |
frame_num = 0
|
69 |
|
70 |
while True:
|
@@ -238,8 +238,8 @@ def get_image(image, sketch, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, see
|
|
238 |
batch_samples = batch_ddim_sampling(model, cond, noise_shape, n_samples=1, ddim_steps=steps, ddim_eta=eta, cfg_scale=cfg_scale, hs=hs)
|
239 |
|
240 |
## remove the last frame
|
241 |
-
if image2 is None:
|
242 |
-
|
243 |
## b,samples,c,t,h,w
|
244 |
prompt_str = prompt.replace("/", "_slash_") if "/" in prompt else prompt
|
245 |
prompt_str = prompt_str.replace(" ", "_") if " " in prompt else prompt_str
|
|
|
64 |
# εη»γγ‘γ€γ«γθͺγΏθΎΌγ
|
65 |
cap = cv2.VideoCapture(video_path)
|
66 |
|
67 |
+
frame_list = []
|
68 |
frame_num = 0
|
69 |
|
70 |
while True:
|
|
|
238 |
batch_samples = batch_ddim_sampling(model, cond, noise_shape, n_samples=1, ddim_steps=steps, ddim_eta=eta, cfg_scale=cfg_scale, hs=hs)
|
239 |
|
240 |
## remove the last frame
|
241 |
+
# if image2 is None:
|
242 |
+
batch_samples = batch_samples[:,:,:,:-1,...]
|
243 |
## b,samples,c,t,h,w
|
244 |
prompt_str = prompt.replace("/", "_slash_") if "/" in prompt else prompt
|
245 |
prompt_str = prompt_str.replace(" ", "_") if " " in prompt else prompt_str
|