DISCLAIMER: Asked Gemini to write below, then edited for conciseness and precision.
The SDXL Power Prompt - Positive and SDXL Power Prompt - Simple / Negative nodes currently return None for conditioning when used with recent versions of ComfyUI. This happens when width, height, or both are passed. This causes downstream samplers to crash with the following error: TypeError: 'NoneType' object is not iterable.
Root Cause:
- API Change: In recent ComfyUI versions (utilizing the new io.ComfyNode API), the core CLIPTextEncodeSDXL class (in
comfy_extras/nodes_clip_sdxl.py) no longer provides an .encode() method. It now uses .execute().
- Logic Bug in rgthree-comfy: In py/sdxl_power_prompt_postive.py, the get_conditioning method wraps the
CLIPTextEncodeSDXL call in a try...except block. However, when the exception occurs (due to the missing .encode()
method), the except block incorrectly keeps do_regular_clip_text_encode set to True.
- Failed Fallback: Because do_regular_clip_text_encode remains True, the node skips the fallback to standard
CLIPTextEncode, resulting in the function returning the initial None value for conditioning.
DISCLAIMER: Asked Gemini to write below, then edited for conciseness and precision.
The SDXL Power Prompt - Positive and SDXL Power Prompt - Simple / Negative nodes currently return None for conditioning when used with recent versions of ComfyUI. This happens when width, height, or both are passed. This causes downstream samplers to crash with the following error:
TypeError: 'NoneType' object is not iterable.Root Cause:
comfy_extras/nodes_clip_sdxl.py) no longer provides an .encode() method. It now uses .execute().
CLIPTextEncodeSDXL call in a try...except block. However, when the exception occurs (due to the missing .encode()
method), the except block incorrectly keeps do_regular_clip_text_encode set to True.
CLIPTextEncode, resulting in the function returning the initial None value for conditioning.