From 3bd898b6ce94f34bcc7685672f0e4318d2d86b33 Mon Sep 17 00:00:00 2001 From: invincibledude <> Date: Sat, 21 Jan 2023 23:14:59 +0300 Subject: First test of different sampler for hi-res fix --- modules/txt2img.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/txt2img.py') diff --git a/modules/txt2img.py b/modules/txt2img.py index e945fd69..21f48d12 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -8,7 +8,7 @@ import modules.processing as processing from modules.ui import plaintext_to_html -def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: 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, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, *args): +def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: 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, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, hr_sampler_index: int, *args): p = StableDiffusionProcessingTxt2Img( sd_model=shared.sd_model, outpath_samples=opts.outdir_samples or opts.outdir_txt2img_samples, @@ -38,6 +38,8 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step hr_second_pass_steps=hr_second_pass_steps, hr_resize_x=hr_resize_x, hr_resize_y=hr_resize_y, + hr_sampler=sd_samplers.samplers[hr_sampler_index].name + if hr_sampler_index != 0 else sd_samplers.samplers[sampler_index].name ) p.scripts = modules.scripts.scripts_txt2img -- cgit v1.2.3 From 6c0566f937ba212e3faf1d30c337850543e85a12 Mon Sep 17 00:00:00 2001 From: invincibledude <> Date: Sat, 21 Jan 2023 23:25:36 +0300 Subject: Type mismatch fix --- modules/txt2img.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/txt2img.py') diff --git a/modules/txt2img.py b/modules/txt2img.py index 21f48d12..3d16ac5b 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -39,7 +39,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step hr_resize_x=hr_resize_x, hr_resize_y=hr_resize_y, hr_sampler=sd_samplers.samplers[hr_sampler_index].name - if hr_sampler_index != 0 else sd_samplers.samplers[sampler_index].name + if hr_sampler_index != 0 else 0 ) p.scripts = modules.scripts.scripts_txt2img -- cgit v1.2.3 From 8bec3a2aa10d3c8ab15cca51b3b498e6ba350105 Mon Sep 17 00:00:00 2001 From: invincibledude <> Date: Sat, 21 Jan 2023 23:31:36 +0300 Subject: Index fix --- modules/txt2img.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/txt2img.py') diff --git a/modules/txt2img.py b/modules/txt2img.py index 3d16ac5b..8560b74f 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -38,7 +38,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step hr_second_pass_steps=hr_second_pass_steps, hr_resize_x=hr_resize_x, hr_resize_y=hr_resize_y, - hr_sampler=sd_samplers.samplers[hr_sampler_index].name + hr_sampler=sd_samplers.samplers[hr_sampler_index - 1].name if hr_sampler_index != 0 else 0 ) -- cgit v1.2.3 From 6cd7bf9f860dff3b61a50ec2d41915536cbcf448 Mon Sep 17 00:00:00 2001 From: invincibledude <> Date: Sun, 22 Jan 2023 00:08:58 +0300 Subject: PLMS edge-case handling fix 3 --- modules/txt2img.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/txt2img.py') diff --git a/modules/txt2img.py b/modules/txt2img.py index 8560b74f..9c8ec621 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -39,7 +39,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step hr_resize_x=hr_resize_x, hr_resize_y=hr_resize_y, hr_sampler=sd_samplers.samplers[hr_sampler_index - 1].name - if hr_sampler_index != 0 else 0 + if hr_sampler_index != 0 else '---' ) p.scripts = modules.scripts.scripts_txt2img -- cgit v1.2.3 From 0f6862ef3041f3ee18e8236765b1c1958c84385b Mon Sep 17 00:00:00 2001 From: invincibledude <> Date: Sun, 22 Jan 2023 00:11:05 +0300 Subject: PLMS edge-case handling fix 5 --- modules/txt2img.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/txt2img.py') diff --git a/modules/txt2img.py b/modules/txt2img.py index 9c8ec621..c6ea11c2 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -38,7 +38,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step hr_second_pass_steps=hr_second_pass_steps, hr_resize_x=hr_resize_x, hr_resize_y=hr_resize_y, - hr_sampler=sd_samplers.samplers[hr_sampler_index - 1].name + hr_sampler=sd_samplers.samplers_for_img2img[hr_sampler_index - 1].name if hr_sampler_index != 0 else '---' ) -- cgit v1.2.3 From f7b38c484151a50a75788094d9cd357dd4841966 Mon Sep 17 00:00:00 2001 From: invincibledude <> Date: Sun, 22 Jan 2023 00:18:26 +0300 Subject: Style fix --- modules/txt2img.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/txt2img.py') diff --git a/modules/txt2img.py b/modules/txt2img.py index c6ea11c2..2eb41f3d 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -38,8 +38,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step hr_second_pass_steps=hr_second_pass_steps, hr_resize_x=hr_resize_x, hr_resize_y=hr_resize_y, - hr_sampler=sd_samplers.samplers_for_img2img[hr_sampler_index - 1].name - if hr_sampler_index != 0 else '---' + hr_sampler=sd_samplers.samplers_for_img2img[hr_sampler_index - 1].name if hr_sampler_index != 0 else '---' ) p.scripts = modules.scripts.scripts_txt2img -- cgit v1.2.3 From 8114959e7e937361b719cd85bec246ffd258dca6 Mon Sep 17 00:00:00 2001 From: invincibledude <> Date: Sun, 22 Jan 2023 14:28:53 +0300 Subject: Hr separate prompt test --- modules/txt2img.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/txt2img.py') diff --git a/modules/txt2img.py b/modules/txt2img.py index 2eb41f3d..c06f9f9d 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -8,7 +8,7 @@ import modules.processing as processing from modules.ui import plaintext_to_html -def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: 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, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, hr_sampler_index: int, *args): +def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, steps: int, sampler_index: int, restore_faces: bool, tiling: bool, n_iter: int, batch_size: int, cfg_scale: 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, enable_hr: bool, denoising_strength: float, hr_scale: float, hr_upscaler: str, hr_second_pass_steps: int, hr_resize_x: int, hr_resize_y: int, hr_sampler_index: int, hr_prompt: str, hr_negative_prompt, *args): p = StableDiffusionProcessingTxt2Img( sd_model=shared.sd_model, outpath_samples=opts.outdir_samples or opts.outdir_txt2img_samples, @@ -38,7 +38,9 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step hr_second_pass_steps=hr_second_pass_steps, hr_resize_x=hr_resize_x, hr_resize_y=hr_resize_y, - hr_sampler=sd_samplers.samplers_for_img2img[hr_sampler_index - 1].name if hr_sampler_index != 0 else '---' + hr_sampler=sd_samplers.samplers_for_img2img[hr_sampler_index - 1].name if hr_sampler_index != 0 else '---', + hr_prompt=hr_prompt, + hr_negative_prompt=hr_negative_prompt ) p.scripts = modules.scripts.scripts_txt2img -- cgit v1.2.3