From 3c919f0337d38e72c8e007a33458dbb070e4e697 Mon Sep 17 00:00:00 2001 From: Kevin Turner <83819+keturn@users.noreply.github.com> Date: Tue, 17 Jan 2023 11:37:14 -0800 Subject: [PATCH] Restore ldm/invoke/conditioning.py --- ldm/invoke/conditioning.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ldm/invoke/conditioning.py b/ldm/invoke/conditioning.py index 2a687d4c51..fec3c7e7b1 100644 --- a/ldm/invoke/conditioning.py +++ b/ldm/invoke/conditioning.py @@ -17,7 +17,7 @@ from ..models.diffusion import cross_attention_control from ..models.diffusion.shared_invokeai_diffusion import InvokeAIDiffuserComponent from ..modules.encoders.modules import WeightedFrozenCLIPEmbedder from ..modules.prompt_to_embeddings_converter import WeightedPromptFragmentsToEmbeddingsConverter -from ldm.invoke.devices import torch_dtype + def get_uc_and_c_and_ec(prompt_string, model, log_tokens=False, skip_normalize_legacy_blend=False): @@ -238,6 +238,7 @@ def _get_embeddings_and_tokens_for_prompt(model, flattened_prompt: FlattenedProm if log_tokens: text = " ".join(fragments) log_tokenization(text, model, display_label=log_display_label) + return embeddings, tokens