Allen
commited on
Commit
•
32d1201
1
Parent(s):
f132c07
- handler.py +1 -0
handler.py
CHANGED
@@ -17,6 +17,7 @@ class EndpointHandler():
|
|
17 |
print("Loading model from:", path)
|
18 |
self.pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16)
|
19 |
self.pipe = self.pipe.to(device)
|
|
|
20 |
|
21 |
|
22 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
|
|
17 |
print("Loading model from:", path)
|
18 |
self.pipe = StableDiffusionPipeline.from_pretrained(path, torch_dtype=torch.float16)
|
19 |
self.pipe = self.pipe.to(device)
|
20 |
+
self.pipe.safety_checker = lambda images, clip_input: (images, None)
|
21 |
|
22 |
|
23 |
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|