Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,12 @@
|
|
1 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
import gradio as gr
|
3 |
from gradio.themes.utils import colors, fonts, sizes
|
4 |
import argparse
|
@@ -16,22 +24,9 @@ from utils import mask_generation_before
|
|
16 |
from backend import auto_inpainting
|
17 |
from einops import rearrange
|
18 |
import torchvision
|
19 |
-
import sys
|
20 |
from PIL import Image
|
21 |
from transformers import CLIPVisionModelWithProjection, CLIPImageProcessor
|
22 |
from transformers.image_transforms import convert_to_rgb
|
23 |
-
try:
|
24 |
-
import utils
|
25 |
-
|
26 |
-
from diffusion import create_diffusion
|
27 |
-
from download import find_model
|
28 |
-
except:
|
29 |
-
sys.path.append(os.path.split(sys.path[0])[0])
|
30 |
-
|
31 |
-
import utils
|
32 |
-
|
33 |
-
from diffusion import create_diffusion
|
34 |
-
from download import find_model
|
35 |
|
36 |
|
37 |
def auto_inpainting(video_input, masked_video, mask, prompt, image, vae, text_encoder, image_encoder, diffusion, model, device, cfg_scale, img_cfg_scale, negative_prompt=""):
|
|
|
1 |
import torch
|
2 |
+
import sys
|
3 |
+
try:
|
4 |
+
import utils
|
5 |
+
from diffusion import create_diffusion
|
6 |
+
except:
|
7 |
+
sys.path.append(os.path.split(sys.path[0])[0])
|
8 |
+
import utils
|
9 |
+
|
10 |
import gradio as gr
|
11 |
from gradio.themes.utils import colors, fonts, sizes
|
12 |
import argparse
|
|
|
24 |
from backend import auto_inpainting
|
25 |
from einops import rearrange
|
26 |
import torchvision
|
|
|
27 |
from PIL import Image
|
28 |
from transformers import CLIPVisionModelWithProjection, CLIPImageProcessor
|
29 |
from transformers.image_transforms import convert_to_rgb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
|
32 |
def auto_inpainting(video_input, masked_video, mask, prompt, image, vae, text_encoder, image_encoder, diffusion, model, device, cfg_scale, img_cfg_scale, negative_prompt=""):
|