Spaces:
Sleeping
Sleeping
Update src/pipelines/inpainting.py
Browse files
src/pipelines/inpainting.py
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
import torch
|
|
|
2 |
import gradio as gr
|
3 |
from src.util.base import *
|
4 |
from src.util.params import *
|
5 |
from diffusers import AutoPipelineForInpainting
|
6 |
|
7 |
-
|
8 |
-
inpaint_pipe = AutoPipelineForInpainting.from_pipe(pipe).to(torch_device)
|
9 |
-
|
10 |
|
|
|
11 |
def inpaint(dict, num_inference_steps, seed, prompt="", progress=gr.Progress()):
|
12 |
progress(0)
|
13 |
mask = dict["mask"].convert("RGB").resize((imageHeight, imageWidth))
|
|
|
1 |
import torch
|
2 |
+
import spaces
|
3 |
import gradio as gr
|
4 |
from src.util.base import *
|
5 |
from src.util.params import *
|
6 |
from diffusers import AutoPipelineForInpainting
|
7 |
|
8 |
+
inpaint_pipe = AutoPipelineForInpainting.from_pretrained(inpaint_model_path).to(torch_device)
|
9 |
+
# inpaint_pipe = AutoPipelineForInpainting.from_pipe(pipe).to(torch_device)
|
|
|
10 |
|
11 |
+
@spaces.GPU(enable_queue=True)
|
12 |
def inpaint(dict, num_inference_steps, seed, prompt="", progress=gr.Progress()):
|
13 |
progress(0)
|
14 |
mask = dict["mask"].convert("RGB").resize((imageHeight, imageWidth))
|