Skip to content

Commit 8083f4a

Browse files
committed
local change
1 parent 583cc04 commit 8083f4a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python_coreml_stable_diffusion/pipeline.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ def run_safety_checker(self, image):
195195

196196
return image, has_nsfw_concept
197197

198+
def run_null_checker(self, image):
199+
return image, None
200+
198201
def decode_latents(self, latents):
199202
latents = 1 / 0.18215 * latents
200203
image = self.vae_decoder(z=latents.astype(np.float16))["image"]
@@ -354,7 +357,8 @@ def __call__(
354357
image = self.decode_latents(latents)
355358

356359
# 9. Run safety checker
357-
image, has_nsfw_concept = self.run_safety_checker(image)
360+
# image, has_nsfw_concept = self.run_safety_checker(image)
361+
image, has_nsfw_concept = self.run_null_checker(image)
358362

359363
# 10. Convert to PIL
360364
if output_type == "pil":

0 commit comments

Comments
 (0)