aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_hijack.py
diff options
context:
space:
mode:
authorKohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>2023-08-04 14:38:16 +0800
committerKohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>2023-08-04 14:38:16 +0800
commit70e66e81e56f0bb187395878ee49705acbfab40c (patch)
treeb7745d409c7c9192eec0fe0722acf316f8342f79 /modules/sd_hijack.py
parentc134a480164bef017cd4b33fae57a31a86556beb (diff)
parentf0c1063a707a4a43823b0ed00e2a8eeb22a9ed0a (diff)
Merge branch 'dev' into efficient-vae-methods
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 cfa5f0eb..609fd56c 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
@@ -164,12 +163,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):