Update handler.py
Browse files- handler.py +2 -1
handler.py
CHANGED
|
@@ -6,6 +6,7 @@ from diffusers import StableDiffusionControlNetPipeline, ControlNetModel
|
|
| 6 |
# import Safety Checker
|
| 7 |
# from transformers import AutoProcessor, SafetyChecker
|
| 8 |
from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker
|
|
|
|
| 9 |
import torch
|
| 10 |
|
| 11 |
|
|
@@ -70,7 +71,7 @@ class EndpointHandler():
|
|
| 70 |
controlnet=self.controlnet,
|
| 71 |
torch_dtype=dtype,
|
| 72 |
#safety_checker=None).to(device)
|
| 73 |
-
processor = AutoProcessor.from_pretrained("CompVis/stable-diffusion-safety-checker")
|
| 74 |
safety_checker = SafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker")
|
| 75 |
|
| 76 |
# Define Generator with seed
|
|
|
|
| 6 |
# import Safety Checker
|
| 7 |
# from transformers import AutoProcessor, SafetyChecker
|
| 8 |
from diffusers.pipelines.stable_diffusion import StableDiffusionSafetyChecker
|
| 9 |
+
|
| 10 |
import torch
|
| 11 |
|
| 12 |
|
|
|
|
| 71 |
controlnet=self.controlnet,
|
| 72 |
torch_dtype=dtype,
|
| 73 |
#safety_checker=None).to(device)
|
| 74 |
+
#processor = AutoProcessor.from_pretrained("CompVis/stable-diffusion-safety-checker")
|
| 75 |
safety_checker = SafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker")
|
| 76 |
|
| 77 |
# Define Generator with seed
|