yamildiego commited on
Commit
a831ddd
·
1 Parent(s): 1f7551f

add test print

Browse files
Files changed (1) hide show
  1. handler.py +5 -15
handler.py CHANGED
@@ -70,21 +70,6 @@ class EndpointHandler():
70
  # Load StableDiffusionControlNetPipeline
71
  #self.stable_diffusion_id = "runwayml/stable-diffusion-v1-5"
72
  self.stable_diffusion_id = "Lykon/dreamshaper-8"
73
- # self.pipe = StableDiffusionControlNetPipeline.from_pretrained(self.stable_diffusion_id,
74
- # controlnet=self.controlnet,
75
- # torch_dtype=dtype,
76
- # #safety_checker=None).to(device)
77
- # #processor = AutoProcessor.from_pretrained("CompVis/stable-diffusion-safety-checker")
78
- # #safety_checker = SafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker")
79
- # safety_checker = StableDiffusionSafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker")
80
-
81
- # self.pipe = StableDiffusionControlNetPipeline.from_pretrained(
82
- # self.stable_diffusion_id,
83
- # controlnet=self.controlnet,
84
- # torch_dtype=dtype,
85
- # safety_checker = SafetyChecker.from_pretrained("CompVis/stable-diffusion-safety-checker")
86
- # ).to(device)
87
-
88
 
89
  self.pipe = StableDiffusionControlNetPipeline.from_pretrained(self.stable_diffusion_id,
90
  controlnet=self.controlnet,
@@ -124,6 +109,11 @@ class EndpointHandler():
124
  width = data.pop("width", None)
125
  controlnet_conditioning_scale = data.pop("controlnet_conditioning_scale", 1.0)
126
 
 
 
 
 
 
127
  # process image
128
  image = self.decode_base64_image(image)
129
  #control_image = CONTROLNET_MAPPING[self.control_type]["hinter"](image)
 
70
  # Load StableDiffusionControlNetPipeline
71
  #self.stable_diffusion_id = "runwayml/stable-diffusion-v1-5"
72
  self.stable_diffusion_id = "Lykon/dreamshaper-8"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
  self.pipe = StableDiffusionControlNetPipeline.from_pretrained(self.stable_diffusion_id,
75
  controlnet=self.controlnet,
 
109
  width = data.pop("width", None)
110
  controlnet_conditioning_scale = data.pop("controlnet_conditioning_scale", 1.0)
111
 
112
+ test_var = data.pop("test_var", "DEFAULT")
113
+
114
+ print(f"prompt: {prompt}")
115
+ print(f"prompt: {test_var}")
116
+
117
  # process image
118
  image = self.decode_base64_image(image)
119
  #control_image = CONTROLNET_MAPPING[self.control_type]["hinter"](image)