Skip to content

Bug: SDXL Power Prompt returns None conditioning due to CLIPTextEncodeSDXL API change #707

@poipoi300

Description

@poipoi300

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:

  1. 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().
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions