Spaces:
Runtime error
Runtime error
Update inference.py
Browse files- inference.py +2 -2
inference.py
CHANGED
|
@@ -8,7 +8,7 @@ import sys
|
|
| 8 |
import gradio as gr
|
| 9 |
import PIL.Image
|
| 10 |
import torch
|
| 11 |
-
from diffusers import
|
| 12 |
|
| 13 |
|
| 14 |
class InferencePipeline:
|
|
@@ -23,7 +23,7 @@ class InferencePipeline:
|
|
| 23 |
gc.collect()
|
| 24 |
|
| 25 |
def load_pipe(self, realfill_model: str) -> None:
|
| 26 |
-
pipe =
|
| 27 |
realfill_model, torch_dtype=torch.float16
|
| 28 |
).to(self.device)
|
| 29 |
pipe = pipe.to(self.device)
|
|
|
|
| 8 |
import gradio as gr
|
| 9 |
import PIL.Image
|
| 10 |
import torch
|
| 11 |
+
from diffusers import StableDiffusionInpaintPipeline
|
| 12 |
|
| 13 |
|
| 14 |
class InferencePipeline:
|
|
|
|
| 23 |
gc.collect()
|
| 24 |
|
| 25 |
def load_pipe(self, realfill_model: str) -> None:
|
| 26 |
+
pipe = StableDiffusionInpaintPipeline.from_pretrained(
|
| 27 |
realfill_model, torch_dtype=torch.float16
|
| 28 |
).to(self.device)
|
| 29 |
pipe = pipe.to(self.device)
|