diff --git a/README.md b/README.md index 361b78a..aa6207c 100644 --- a/README.md +++ b/README.md @@ -73,13 +73,6 @@ If you wish to modify the face of an already existing image instead of creating ![screen-shot](./images/screen-shot.jpg) 2. Click **Generate** button. -### Face control with ControlNet -You can control facial expressions with ControlNet by enabled **"Apply scripts to faces"**. Normally, no other scripts are executed during face image generation, but by enabling this option, they will be. - -However, care must be taken when using this option: the ControlNet input image must be specified only in img2img, and nothing must be specified in the ControlNet panel. Specifying it in the ControlNet panel will completely collapse the image. - -For more information, please see: [here](https://github.com/ototadana/sd-face-editor/issues/41#issuecomment-1537340496). - ## How it works This script performs the following steps: @@ -208,11 +201,6 @@ For more information, please see: [here](https://github.com/ototadana/sd-face-ed ### Show intermediate steps Specifies whether to display images of detected faces and masks. -### Apply scripts to faces -Normally, no other scripts are executed during face image generation, but by enabling this option, they will be. - -For more information, please see: [here](https://github.com/ototadana/sd-face-editor/issues/41#issuecomment-1537340496). - ## API If you want to use this script as an extension (alwayson_scripts) in the [API](https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/API), specify **"face editor ex"** as the script name as follows: diff --git a/scripts/face_editor.py b/scripts/face_editor.py index a07c9a4..0fb0f78 100644 --- a/scripts/face_editor.py +++ b/scripts/face_editor.py @@ -192,6 +192,7 @@ def ui(self, is_img2img): apply_scripts_to_faces = gr.Checkbox( label="Apply scripts to faces", + visible=False, value=False) self.components.append((apply_scripts_to_faces, self.add_prefix("apply_scripts_to_faces"))) @@ -388,6 +389,8 @@ def __proc_image(self, p: StableDiffusionProcessingImg2Img, self.add_prefix("ignore_larger_faces"): ignore_larger_faces, } + apply_scripts_to_faces = False + if hasattr(p.init_images[0], 'mode') and p.init_images[0].mode != 'RGB': p.init_images[0] = p.init_images[0].convert('RGB')