diff --git a/recipes/QRCodeGenerator.py b/recipes/QRCodeGenerator.py index a2f6652fe..cfa9ce013 100644 --- a/recipes/QRCodeGenerator.py +++ b/recipes/QRCodeGenerator.py @@ -28,6 +28,7 @@ ) from daras_ai_v2.loom_video_widget import youtube_video from daras_ai_v2.repositioning import reposition_object, repositioning_preview_widget +from daras_ai_v2.safety_checker import safety_checker from daras_ai_v2.stable_diffusion import ( Text2ImgModels, controlnet, @@ -472,6 +473,9 @@ def _render_outputs(self, state: dict, max_count: int | None = None): def run(self, state: dict) -> typing.Iterator[str | None]: request: QRCodeGeneratorPage.RequestModel = self.RequestModel.parse_obj(state) + yield "Running safety checker..." + safety_checker(text=request.text_prompt, image=request.image_prompt) + yield "Generating QR Code..." image, qr_code_data, did_shorten = generate_and_upload_qr_code( request, self.request.user