From ffee8d65af47ecb145fd576e40886ece9392cf47 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sat, 27 Jan 2024 08:56:45 -0500 Subject: [PATCH] fix unidiffuser --- CHANGELOG.md | 2 +- modules/textual_inversion/textual_inversion.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index afedf367b..9731d74f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -129,7 +129,7 @@ As of this release, default backend is set to **diffusers** as its more feature - greatly improves temporal consistency of generated outputs - all options are available in animateddiff script - [SalesForce BlipDiffusion](https://huggingface.co/docs/diffusers/api/pipelines/blip_diffusion) - - model can be used to replace anything in an image + - model can be used to place subject in a different context - requires input image - last word in prompt and negative prompt will be used as source and target subjects - sampler must be set to default before loading the model diff --git a/modules/textual_inversion/textual_inversion.py b/modules/textual_inversion/textual_inversion.py index cc264ee17..1c0dbcca4 100644 --- a/modules/textual_inversion/textual_inversion.py +++ b/modules/textual_inversion/textual_inversion.py @@ -154,7 +154,7 @@ class EmbeddingDatabase: tokenizer_2 = getattr(pipe, 'tokenizer_2', None) clip_l = getattr(pipe, 'text_encoder', None) # clip_l clip_g = getattr(pipe, 'text_encoder_2', None) # clip_g - if clip_l is None and tokenizer is None: + if clip_l is None or tokenizer is None: return 0 filenames = (