Skip to content

Commit 7071c43

Browse files
authored
Merge pull request AUTOMATIC1111#11 from hlky/repo-sync/stable-diffusion-webui/default
🔄 Synced file(s) with hlky/stable-diffusion-webui
2 parents cdf31a5 + 08b225d commit 7071c43

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

scripts/webui.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,7 @@ def process_images(outpath, func_init, func_sample, prompt, seed, sampler_name,
456456
prompts = all_prompts[n * batch_size:(n + 1) * batch_size]
457457
seeds = all_seeds[n * batch_size:(n + 1) * batch_size]
458458

459-
uc = None
460-
if cfg_scale != 1.0:
461-
uc = model.get_learned_conditioning(len(prompts) * [""])
459+
uc = model.get_learned_conditioning(len(prompts) * [""])
462460
if isinstance(prompts, tuple):
463461
prompts = list(prompts)
464462

@@ -558,9 +556,8 @@ def txt2img(prompt: str, ddim_steps: int, sampler_name: str, toggles: list, ddim
558556
err = False
559557
seed = seed_to_int(seed)
560558

561-
# print('toggles:', toggles)
562559
prompt_matrix = 0 in toggles
563-
normalize_prompt_weights = toggles[1]
560+
normalize_prompt_weights = 1 in toggles
564561
skip_save = 2 not in toggles
565562
skip_grid = 3 not in toggles
566563
use_GFPGAN = 4 in toggles
@@ -718,7 +715,7 @@ def img2img(prompt: str, init_info, mask_mode, ddim_steps: int, sampler_name: st
718715
seed = seed_to_int(seed)
719716

720717
prompt_matrix = 0 in toggles
721-
normalize_prompt_weights = toggles[1]
718+
normalize_prompt_weights = 1 in toggles
722719
loopback = 2 in toggles
723720
skip_save = 3 not in toggles
724721
skip_grid = 4 not in toggles

0 commit comments

Comments
 (0)