Update handler.py
Browse files- handler.py +3 -1
handler.py
CHANGED
|
@@ -7,7 +7,9 @@ from diffusers import StableDiffusionImg2ImgPipeline
|
|
| 7 |
pipe = None
|
| 8 |
|
| 9 |
class EndpointHandler:
|
| 10 |
-
def __init__(self):
|
|
|
|
|
|
|
| 11 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 12 |
|
| 13 |
def init(self):
|
|
|
|
| 7 |
pipe = None
|
| 8 |
|
| 9 |
class EndpointHandler:
|
| 10 |
+
def __init__(self,model_dir):
|
| 11 |
+
super().__init__(model_dir)
|
| 12 |
+
self.model_dir = model_dir
|
| 13 |
self.device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 14 |
|
| 15 |
def init(self):
|