diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-25 15:48:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-25 15:48:25 +0000 |
commit | 23dafe6d868d8da1523f71bc08266e370675a909 (patch) | |
tree | d457e3625bd9eaaeef3ced98c32e365b75f625f0 | |
parent | 11485659dca08ef967f3e5462382f91504195ef0 (diff) | |
parent | f64af77adcd20fabe00e1e642512db9c6742ed23 (diff) | |
download | stable-diffusion-webui-gfx803-23dafe6d868d8da1523f71bc08266e370675a909.tar.gz stable-diffusion-webui-gfx803-23dafe6d868d8da1523f71bc08266e370675a909.tar.bz2 stable-diffusion-webui-gfx803-23dafe6d868d8da1523f71bc08266e370675a909.zip |
Merge pull request #7151 from brkirch/fix-approx-nn
Fix Approx NN previews changing first generation result
-rw-r--r-- | modules/processing.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py index bc541e2f..3bd590ba 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -13,7 +13,7 @@ from skimage import exposure from typing import Any, Dict, List, Optional
import modules.sd_hijack
-from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks
+from modules import devices, prompt_parser, masking, sd_samplers, lowvram, generation_parameters_copypaste, script_callbacks, extra_networks, sd_vae_approx
from modules.sd_hijack import model_hijack
from modules.shared import opts, cmd_opts, state
import modules.shared as shared
@@ -568,6 +568,10 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed: with devices.autocast():
p.init(p.all_prompts, p.all_seeds, p.all_subseeds)
+ if shared.opts.live_previews_enable and sd_samplers.approximation_indexes.get(shared.opts.show_progress_type, 0) == 1:
+ # preload approx nn model before sampling for a more deterministic result
+ sd_vae_approx.model()
+
if not p.disable_extra_networks:
extra_networks.activate(p, extra_network_data)
|