Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,10 +3,7 @@ import gradio as gr
|
|
| 3 |
import spaces
|
| 4 |
import torch
|
| 5 |
import os
|
| 6 |
-
import math
|
| 7 |
-
import tempfile
|
| 8 |
import librosa
|
| 9 |
-
import gc
|
| 10 |
from PIL import Image, ImageSequence
|
| 11 |
from decord import VideoReader, cpu
|
| 12 |
from moviepy.editor import VideoFileClip
|
|
@@ -163,8 +160,6 @@ def generate(input,
|
|
| 163 |
use_image_id = False,
|
| 164 |
max_slice_nums = 2
|
| 165 |
)
|
| 166 |
-
torch.cuda.empty_cache()
|
| 167 |
-
gc.collect()
|
| 168 |
return output
|
| 169 |
|
| 170 |
def cloud():
|
|
|
|
| 3 |
import spaces
|
| 4 |
import torch
|
| 5 |
import os
|
|
|
|
|
|
|
| 6 |
import librosa
|
|
|
|
| 7 |
from PIL import Image, ImageSequence
|
| 8 |
from decord import VideoReader, cpu
|
| 9 |
from moviepy.editor import VideoFileClip
|
|
|
|
| 160 |
use_image_id = False,
|
| 161 |
max_slice_nums = 2
|
| 162 |
)
|
|
|
|
|
|
|
| 163 |
return output
|
| 164 |
|
| 165 |
def cloud():
|