From 333428940416e7d0bd955712d4aa15078acbce11 Mon Sep 17 00:00:00 2001 From: poipoi300 Date: Sat, 21 Mar 2026 12:53:21 -0400 Subject: [PATCH] Fix SDXL Power Prompt NoneType conditioning by adding .execute() fallback --- py/sdxl_power_prompt_postive.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/py/sdxl_power_prompt_postive.py b/py/sdxl_power_prompt_postive.py index d070da03..a8ec026e 100644 --- a/py/sdxl_power_prompt_postive.py +++ b/py/sdxl_power_prompt_postive.py @@ -157,11 +157,17 @@ def get_conditioning(self, prompt_g, prompt_l, opt_clip, opt_clip_width, opt_cli crop_width = crop_width if crop_width and crop_width > 0 else 0 crop_height = crop_height if crop_height and crop_height > 0 else 0 try: - conditioning = CLIPTextEncodeSDXL().encode(opt_clip, opt_clip_width, opt_clip_height, - crop_width, crop_height, target_width, - target_height, prompt_g, prompt_l)[0] + sdxl_node = CLIPTextEncodeSDXL() + if hasattr(sdxl_node, 'encode'): + conditioning = sdxl_node.encode(opt_clip, opt_clip_width, opt_clip_height, + crop_width, crop_height, target_width, + target_height, prompt_g, prompt_l)[0] + else: + conditioning = sdxl_node.execute(opt_clip, opt_clip_width, opt_clip_height, + crop_width, crop_height, target_width, + target_height, prompt_g, prompt_l)[0] except Exception: - do_regular_clip_text_encode = True + do_regular_clip_text_encode = False log_node_info( self.NAME, 'Exception while attempting to CLIPTextEncodeSDXL, will fall back to standard encoding.'