diff --git a/extras/inpaint_mask.py b/extras/inpaint_mask.py index 8026d7e8..3ee00cf4 100644 --- a/extras/inpaint_mask.py +++ b/extras/inpaint_mask.py @@ -33,11 +33,11 @@ def generate_mask_from_image(image: np.ndarray, mask_model: str, extras: dict, b if debug_dino: from PIL import ImageDraw, Image - image_with_boxes = Image.new("RGB", (image.shape[1], image.shape[0]), color="black") - draw = ImageDraw.Draw(image_with_boxes) + debug_dino_image = Image.new("RGB", (image.shape[1], image.shape[0]), color="black") + draw = ImageDraw.Draw(debug_dino_image) for box in extras['sam_prompt']: draw.rectangle(box['data'], fill="white") - return np.array(image_with_boxes) + return np.array(debug_dino_image) return remove( image, diff --git a/language/en.json b/language/en.json index 62c0ac31..dc208f3e 100644 --- a/language/en.json +++ b/language/en.json @@ -47,6 +47,7 @@ "Mask generation model": "Mask generation model", "Cloth category": "Cloth category", "Segmentation prompt": "Segmentation prompt", + "Use singular whenever possible": "Use singular whenever possible", "Advanced options": "Advanced options", "SAM model": "SAM model", "Quantization": "Quantization", diff --git a/webui.py b/webui.py index f929e49f..a036dfb5 100644 --- a/webui.py +++ b/webui.py @@ -223,7 +223,7 @@ with shared.gradio_root: choices=flags.inpaint_mask_cloth_category, value=modules.config.default_inpaint_mask_cloth_category, visible=False) - inpaint_mask_sam_prompt_text = gr.Textbox(label='Segmentation prompt', value='', visible=False) + inpaint_mask_sam_prompt_text = gr.Textbox(label='Segmentation prompt', value='', visible=False, info='Use singular whenever possible') with gr.Accordion("Advanced options", visible=False, open=False) as inpaint_mask_advanced_options: inpaint_mask_sam_model = gr.Dropdown(label='SAM model', choices=flags.inpaint_mask_sam_model, value=modules.config.default_inpaint_mask_sam_model) inpaint_mask_sam_quant = gr.Checkbox(label='Quantization', value=False)