diff options
author | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-08-05 00:25:21 +0000 |
---|---|---|
committer | w-e-w <40751091+w-e-w@users.noreply.github.com> | 2023-08-05 00:34:26 +0000 |
commit | 1d60a609a9d7a7f79517dc0c87d4b834b89db252 (patch) | |
tree | 3a901f30d1a0e24ab023d817df4ce87cb6477451 /modules/ui.py | |
parent | 45601766409e531d2b4ee512bf1433600f140183 (diff) | |
download | stable-diffusion-webui-gfx803-1d60a609a9d7a7f79517dc0c87d4b834b89db252.tar.gz stable-diffusion-webui-gfx803-1d60a609a9d7a7f79517dc0c87d4b834b89db252.tar.bz2 stable-diffusion-webui-gfx803-1d60a609a9d7a7f79517dc0c87d4b834b89db252.zip |
configurable masks color and default brush color
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/ui.py b/modules/ui.py index 6cf3dff8..843a75ef 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -663,15 +663,15 @@ def create_ui(): add_copy_image_controls('img2img', init_img)
with gr.TabItem('Sketch', id='img2img_sketch', elem_id="img2img_img2img_sketch_tab") as tab_sketch:
- sketch = gr.Image(label="Image for img2img", elem_id="img2img_sketch", show_label=False, source="upload", interactive=True, type="pil", tool="color-sketch", image_mode="RGBA", height=opts.img2img_editor_height)
+ sketch = gr.Image(label="Image for img2img", elem_id="img2img_sketch", show_label=False, source="upload", interactive=True, type="pil", tool="color-sketch", image_mode="RGBA", height=opts.img2img_editor_height, brush_color=opts.img2img_sketch_default_brush_color)
add_copy_image_controls('sketch', sketch)
with gr.TabItem('Inpaint', id='inpaint', elem_id="img2img_inpaint_tab") as tab_inpaint:
- init_img_with_mask = gr.Image(label="Image for inpainting with mask", show_label=False, elem_id="img2maskimg", source="upload", interactive=True, type="pil", tool="sketch", image_mode="RGBA", height=opts.img2img_editor_height, brush_color='#ffffff')
+ init_img_with_mask = gr.Image(label="Image for inpainting with mask", show_label=False, elem_id="img2maskimg", source="upload", interactive=True, type="pil", tool="sketch", image_mode="RGBA", height=opts.img2img_editor_height, brush_color=opts.img2img_inpaint_mask_brush_color)
add_copy_image_controls('inpaint', init_img_with_mask)
with gr.TabItem('Inpaint sketch', id='inpaint_sketch', elem_id="img2img_inpaint_sketch_tab") as tab_inpaint_color:
- inpaint_color_sketch = gr.Image(label="Color sketch inpainting", show_label=False, elem_id="inpaint_sketch", source="upload", interactive=True, type="pil", tool="color-sketch", image_mode="RGBA", height=opts.img2img_editor_height, brush_color='#ffffff')
+ inpaint_color_sketch = gr.Image(label="Color sketch inpainting", show_label=False, elem_id="inpaint_sketch", source="upload", interactive=True, type="pil", tool="color-sketch", image_mode="RGBA", height=opts.img2img_editor_height, brush_color=opts.img2img_inpaint_sketch_default_brush_color)
inpaint_color_sketch_orig = gr.State(None)
add_copy_image_controls('inpaint_sketch', inpaint_color_sketch)
|