Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,11 +40,10 @@ def frames_to_video(frame_folder, video_path, image_path, frame_count,fps):
|
|
| 40 |
|
| 41 |
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
|
| 42 |
out = cv2.VideoWriter(video_path, fourcc, fps, (width, height))
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
face_enhancers = [gfpgan.GFPGANer(model_path="GFPGANv1.4.pth", upscale=1, device=f'cuda:{i}') for i in range(num_gpus)]
|
| 48 |
|
| 49 |
for i in tqdm(range(frame_count), desc="Converting frames to video"):
|
| 50 |
print("Progress:",progress)
|
|
|
|
| 40 |
|
| 41 |
fourcc = cv2.VideoWriter_fourcc(*'mp4v')
|
| 42 |
out = cv2.VideoWriter(video_path, fourcc, fps, (width, height))
|
| 43 |
+
providers = ["CUDAExecutionProvider"]
|
| 44 |
+
apps = insightface.app.FaceAnalysis(name='buffalo_l', providers=[provider])
|
| 45 |
+
swappers = insightface.model_zoo.get_model("inswapper_128.onnx", download=False, download_zip=False, providers=[provider])
|
| 46 |
+
face_enhancers = gfpgan.GFPGANer(model_path="GFPGANv1.4.pth", upscale=1, device='cuda')
|
|
|
|
| 47 |
|
| 48 |
for i in tqdm(range(frame_count), desc="Converting frames to video"):
|
| 49 |
print("Progress:",progress)
|