aboutsummaryrefslogtreecommitdiffstats
path: root/modules/img2img.py
diff options
context:
space:
mode:
authorJibaku789 <151478027+Jibaku789@users.noreply.github.com>2024-01-01 20:58:55 +0000
committerGitHub <noreply@github.com>2024-01-01 20:58:55 +0000
commita5b6a5a3adcc845237d872750ded34240cc6a810 (patch)
tree6d9e0b9d991907b7d0475854318ec5a3776513bc /modules/img2img.py
parentc2ea571005dab29b285e31a0ad4a97258360bf2d (diff)
downloadstable-diffusion-webui-gfx803-a5b6a5a3adcc845237d872750ded34240cc6a810.tar.gz
stable-diffusion-webui-gfx803-a5b6a5a3adcc845237d872750ded34240cc6a810.tar.bz2
stable-diffusion-webui-gfx803-a5b6a5a3adcc845237d872750ded34240cc6a810.zip
Add inpaint options to img2img.py
Diffstat (limited to 'modules/img2img.py')
-rw-r--r--modules/img2img.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/img2img.py b/modules/img2img.py
index 04de8e62..9e09c0a0 100644
--- a/modules/img2img.py
+++ b/modules/img2img.py
@@ -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"