From 050add58d2186c0df049f56bf08a624761bd1ce0 Mon Sep 17 00:00:00 2001 From: Damian Stewart Date: Sun, 14 May 2023 12:20:54 +0200 Subject: [PATCH] fix getting conditionings --- invokeai/backend/prompting/conditioning.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/invokeai/backend/prompting/conditioning.py b/invokeai/backend/prompting/conditioning.py index 71e51f1103..a6aa5b68f1 100644 --- a/invokeai/backend/prompting/conditioning.py +++ b/invokeai/backend/prompting/conditioning.py @@ -59,14 +59,10 @@ def get_uc_and_c_and_ec(prompt_string, if log_tokens or getattr(Globals, "log_tokenization", False): log_tokenization(positive_prompt, negative_prompt, tokenizer=model.tokenizer) - with InvokeAIDiffuserComponent.custom_attention_context(model.unet, - extra_conditioning_info=None, - step_count=-1): - c, options = compel.build_conditioning_tensor_for_prompt_object(positive_prompt) - uc, _ = compel.build_conditioning_tensor_for_prompt_object(negative_prompt) - [c, uc] = compel.pad_conditioning_tensors_to_same_length([c, uc]) + c, options = compel.build_conditioning_tensor_for_prompt_object(positive_prompt) + uc, _ = compel.build_conditioning_tensor_for_prompt_object(negative_prompt) + [c, uc] = compel.pad_conditioning_tensors_to_same_length([c, uc]) - # now build the "real" ec ec = InvokeAIDiffuserComponent.ExtraConditioningInfo(tokens_count_including_eos_bos=tokens_count, cross_attention_control_args=options.get( 'cross_attention_control', None))