Add inpaint options to img2img.py
This commit is contained in:
parent
c2ea571005
commit
a5b6a5a3ad
|
@ -225,6 +225,18 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s
|
||||||
if mask:
|
if mask:
|
||||||
p.extra_generation_params["Mask blur"] = mask_blur
|
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):
|
with closing(p):
|
||||||
if is_batch:
|
if is_batch:
|
||||||
assert not shared.cmd_opts.hide_ui_dir_config, "Launched with --hide-ui-dir-config, batch img2img disabled"
|
assert not shared.cmd_opts.hide_ui_dir_config, "Launched with --hide-ui-dir-config, batch img2img disabled"
|
||||||
|
|
Loading…
Reference in New Issue