diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-05 04:52:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-05 04:52:50 +0000 |
commit | c613416af375092f55b9bc8649c949e95d250c44 (patch) | |
tree | 69e3bf4d53f4113f192116c252a2e410bb5b1f90 /modules/sd_hijack.py | |
parent | 0ae2767ae6bb775de448b0d8cda1806edb2aef67 (diff) | |
parent | 22ecb78b51f7e6f0234cbc0efbde4ee9a2dc466f (diff) | |
download | stable-diffusion-webui-gfx803-c613416af375092f55b9bc8649c949e95d250c44.tar.gz stable-diffusion-webui-gfx803-c613416af375092f55b9bc8649c949e95d250c44.tar.bz2 stable-diffusion-webui-gfx803-c613416af375092f55b9bc8649c949e95d250c44.zip |
Merge pull request #12227 from AUTOMATIC1111/multiple_loaded_models
option to keep multiple models in memory
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r-- | modules/sd_hijack.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py index 609fd56c..9ad98199 100644 --- a/modules/sd_hijack.py +++ b/modules/sd_hijack.py @@ -5,7 +5,7 @@ from types import MethodType from modules import devices, sd_hijack_optimizations, shared, script_callbacks, errors, sd_unet
from modules.hypernetworks import hypernetwork
from modules.shared import cmd_opts
-from modules import sd_hijack_clip, sd_hijack_open_clip, sd_hijack_unet, sd_hijack_xlmr, xlmr
+from modules import sd_hijack_clip, sd_hijack_open_clip, sd_hijack_unet, sd_hijack_xlmr, xlmr, sd_hijack_inpainting
import ldm.modules.attention
import ldm.modules.diffusionmodules.model
@@ -29,8 +29,12 @@ ldm.modules.attention.MemoryEfficientCrossAttention = ldm.modules.attention.Cros ldm.modules.attention.BasicTransformerBlock.ATTENTION_MODES["softmax-xformers"] = ldm.modules.attention.CrossAttention
# silence new console spam from SD2
-ldm.modules.attention.print = lambda *args: None
-ldm.modules.diffusionmodules.model.print = lambda *args: None
+ldm.modules.attention.print = shared.ldm_print
+ldm.modules.diffusionmodules.model.print = shared.ldm_print
+ldm.util.print = shared.ldm_print
+ldm.models.diffusion.ddpm.print = shared.ldm_print
+
+sd_hijack_inpainting.do_inpainting_hijack()
optimizers = []
current_optimizer: sd_hijack_optimizations.SdOptimization = None
|