diff options
author | Kyle <zerouex@gmail.com> | 2023-02-03 23:19:56 +0000 |
---|---|---|
committer | Kyle <zerouex@gmail.com> | 2023-02-03 23:19:56 +0000 |
commit | 6c6c6636bb123d664999c888cda47a1f8bad635b (patch) | |
tree | a5ef9264c4df1f8b0d322d39118a98dfd4d10b66 /modules/img2img.py | |
parent | 3b2ad20ac1753cb664bd8954dd34f0c04d3678c2 (diff) | |
download | stable-diffusion-webui-gfx803-6c6c6636bb123d664999c888cda47a1f8bad635b.tar.gz stable-diffusion-webui-gfx803-6c6c6636bb123d664999c888cda47a1f8bad635b.tar.bz2 stable-diffusion-webui-gfx803-6c6c6636bb123d664999c888cda47a1f8bad635b.zip |
Image CFG Added (Full Implementation)
Uses separate denoiser for edit (instruct-pix2pix) models
No impact to txt2img or regular img2img
"Image CFG Scale" will only apply to instruct-pix2pix models and metadata will only be added if using such model
Diffstat (limited to 'modules/img2img.py')
-rw-r--r-- | modules/img2img.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/img2img.py b/modules/img2img.py index f813299c..bcc158dc 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -76,7 +76,7 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): processed_image.save(os.path.join(output_dir, filename))
-def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args):
+def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_styles, init_img, sketch, init_img_with_mask, inpaint_color_sketch, inpaint_color_sketch_orig, init_img_inpaint, init_mask_inpaint, steps: int, sampler_index: int, mask_blur: int, mask_alpha: float, inpainting_fill: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: float, image_cfg_scale: float, denoising_strength: float, seed: int, subseed: int, subseed_strength: float, seed_resize_from_h: int, seed_resize_from_w: int, seed_enable_extras: bool, height: int, width: int, resize_mode: int, inpaint_full_res: bool, inpaint_full_res_padding: int, inpainting_mask_invert: int, img2img_batch_input_dir: str, img2img_batch_output_dir: str, img2img_batch_inpaint_mask_dir: str, override_settings_texts, *args):
override_settings = create_override_settings_dict(override_settings_texts)
is_batch = mode == 5
@@ -142,6 +142,7 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s inpainting_fill=inpainting_fill,
resize_mode=resize_mode,
denoising_strength=denoising_strength,
+ image_cfg_scale=image_cfg_scale,
inpaint_full_res=inpaint_full_res,
inpaint_full_res_padding=inpaint_full_res_padding,
inpainting_mask_invert=inpainting_mask_invert,
|