Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
#testing webm hello hello
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
|
| 4 |
import spaces
|
| 5 |
import gradio as gr
|
|
@@ -107,10 +109,8 @@ def doo(video, color, mode, out_format, progress=gr.Progress()):
|
|
| 107 |
print(f"Processing frame {processed_frames}")
|
| 108 |
progress(processed_frames / total_frames, desc=f"Processing frame {processed_frames}/{total_frames}")
|
| 109 |
|
| 110 |
-
out = remover.process(img, type='rgba')
|
| 111 |
-
print("1")
|
| 112 |
out = out.convert('RGBA')
|
| 113 |
-
print("2")
|
| 114 |
|
| 115 |
frame_name = os.path.join(temp_dir, f"frame_{frame_idx:06d}.png")
|
| 116 |
out.save(frame_name, 'PNG')
|
|
|
|
| 1 |
#testing webm hello hello
|
| 2 |
+
#okay why is webm taking that much bruh
|
| 3 |
+
#can someone actually help me please, i dont know whats wrong with the code but it just is so slow when using remover.process(img, type='rgba')
|
| 4 |
+
#but type=color is still fast (used by mp4)
|
| 5 |
|
| 6 |
import spaces
|
| 7 |
import gradio as gr
|
|
|
|
| 109 |
print(f"Processing frame {processed_frames}")
|
| 110 |
progress(processed_frames / total_frames, desc=f"Processing frame {processed_frames}/{total_frames}")
|
| 111 |
|
| 112 |
+
out = remover.process(img, type='rgba') #thing that makes the process go slow
|
|
|
|
| 113 |
out = out.convert('RGBA')
|
|
|
|
| 114 |
|
| 115 |
frame_name = os.path.join(temp_dir, f"frame_{frame_idx:06d}.png")
|
| 116 |
out.save(frame_name, 'PNG')
|