1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Fix dtype safety checker inpaint legacy (#1137)

* [Stable Diffusion Inpaint Legacy] Fiix some things

* uP
This commit is contained in:
Patrick von Platen
2022-11-07 20:57:45 +01:00
committed by GitHub
parent de7536281a
commit 72eae64d67

View File

@@ -414,7 +414,9 @@ class StableDiffusionInpaintPipelineLegacy(DiffusionPipeline):
safety_checker_input = self.feature_extractor(self.numpy_to_pil(image), return_tensors="pt").to(
self.device
)
image, has_nsfw_concept = self.safety_checker(images=image, clip_input=safety_checker_input.pixel_values)
image, has_nsfw_concept = self.safety_checker(
images=image, clip_input=safety_checker_input.pixel_values.to(text_embeddings.dtype)
)
else:
has_nsfw_concept = None