diff --git a/daras_ai_v2/safety_checker.py b/daras_ai_v2/safety_checker.py index d4bc801f1..338d22614 100644 --- a/daras_ai_v2/safety_checker.py +++ b/daras_ai_v2/safety_checker.py @@ -16,8 +16,8 @@ def safety_checker(*, text: str | None = None, image: str | None = None): if text: safety_checker_text(text) - # if image: - # safety_checker_image(image) + if image: + safety_checker_image(image) def safety_checker_text(text_input: str): diff --git a/recipes/Img2Img.py b/recipes/Img2Img.py index 65f208a92..97de89ab7 100644 --- a/recipes/Img2Img.py +++ b/recipes/Img2Img.py @@ -155,12 +155,12 @@ def run(self, state: dict) -> typing.Iterator[str | None]: init_image = request.input_image init_image_bytes = requests.get(init_image).content - yield "Generating Image..." - if not self.request.user.disable_safety_checker: yield "Running safety checker..." safety_checker(text=request.text_prompt, image=request.input_image) + yield "Generating Image..." + if request.selected_model == Img2ImgModels.instruct_pix2pix.name: state["output_images"] = instruct_pix2pix( prompt=request.text_prompt,