aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_hijack.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-05 07:52:29 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-08-05 07:52:29 +0300
commit22ecb78b51f7e6f0234cbc0efbde4ee9a2dc466f (patch)
tree69e3bf4d53f4113f192116c252a2e410bb5b1f90 /modules/sd_hijack.py
parent390bffa81b747a7eb38ac7a0cd6dfb9fcc388151 (diff)
parent0ae2767ae6bb775de448b0d8cda1806edb2aef67 (diff)
Merge branch 'dev' into multiple_loaded_models
Diffstat (limited to 'modules/sd_hijack.py')
-rw-r--r--modules/sd_hijack.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py
index 9722c967..9ad98199 100644
--- a/modules/sd_hijack.py
+++ b/modules/sd_hijack.py
@@ -2,7 +2,6 @@ import torch
from torch.nn.functional import silu
from types import MethodType
-import modules.textual_inversion.textual_inversion
from modules import devices, sd_hijack_optimizations, shared, script_callbacks, errors, sd_unet
from modules.hypernetworks import hypernetwork
from modules.shared import cmd_opts
@@ -168,12 +167,13 @@ class StableDiffusionModelHijack:
clip = None
optimization_method = None
- embedding_db = modules.textual_inversion.textual_inversion.EmbeddingDatabase()
-
def __init__(self):
+ import modules.textual_inversion.textual_inversion
+
self.extra_generation_params = {}
self.comments = []
+ self.embedding_db = modules.textual_inversion.textual_inversion.EmbeddingDatabase()
self.embedding_db.add_embedding_dir(cmd_opts.embeddings_dir)
def apply_optimizations(self, option=None):