charleselena commited on
Commit
a0c9311
1 Parent(s): 01a43d2

Update handler.py

Browse files
Files changed (1) hide show
  1. 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