mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-17 11:50:18 +08:00
Merge pull request #14497 from Jibaku789/dev
Add inpaint arguments in .txt file
This commit is contained in:
commit
6f9fcfdbb7
@ -225,6 +225,18 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s
|
||||
if mask:
|
||||
p.extra_generation_params["Mask blur"] = mask_blur
|
||||
|
||||
if inpainting_mask_invert is not None:
|
||||
p.extra_generation_params["Mask mode"] = inpainting_mask_invert
|
||||
|
||||
if inpainting_fill is not None:
|
||||
p.extra_generation_params["Masked content"] = inpainting_fill
|
||||
|
||||
if inpaint_full_res is not None:
|
||||
p.extra_generation_params["Inpaint area"] = inpaint_full_res
|
||||
|
||||
if inpaint_full_res_padding is not None:
|
||||
p.extra_generation_params["Only masked padding, pixels"] = inpaint_full_res_padding
|
||||
|
||||
with closing(p):
|
||||
if is_batch:
|
||||
assert not shared.cmd_opts.hide_ui_dir_config, "Launched with --hide-ui-dir-config, batch img2img disabled"
|
||||
|
@ -840,6 +840,10 @@ def create_ui():
|
||||
(toprow.ui_styles.dropdown, lambda d: d["Styles array"] if isinstance(d.get("Styles array"), list) else gr.update()),
|
||||
(denoising_strength, "Denoising strength"),
|
||||
(mask_blur, "Mask blur"),
|
||||
(inpainting_mask_invert, 'Mask mode'),
|
||||
(inpainting_fill, 'Masked content'),
|
||||
(inpaint_full_res, 'Inpaint area'),
|
||||
(inpaint_full_res_padding, 'Only masked padding, pixels'),
|
||||
*scripts.scripts_img2img.infotext_fields
|
||||
]
|
||||
parameters_copypaste.add_paste_fields("img2img", init_img, img2img_paste_fields, override_settings)
|
||||
|
Loading…
Reference in New Issue
Block a user