From d4d1014c9fbb0728af5dc3fde781b2b1a3ae881d Mon Sep 17 00:00:00 2001 From: Jan Skurovec Date: Wed, 19 Oct 2022 08:54:47 +0200 Subject: [PATCH] fix for 'model is not defined' when loading embedding --- ldm/generate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ldm/generate.py b/ldm/generate.py index fa72a72d38..b21787eb47 100644 --- a/ldm/generate.py +++ b/ldm/generate.py @@ -728,7 +728,7 @@ class Generate: seed_everything(random.randrange(0, np.iinfo(np.uint32).max)) if self.embedding_path is not None: - model.embedding_manager.load( + self.model.embedding_manager.load( self.embedding_path, self.precision == 'float32' or self.precision == 'autocast' )