diff --git a/comfy_extras/nodes_longcat_image.py b/comfy_extras/nodes_longcat_image.py index 6e8178cdb..59402dfa0 100644 --- a/comfy_extras/nodes_longcat_image.py +++ b/comfy_extras/nodes_longcat_image.py @@ -1,7 +1,11 @@ +import logging + import torch from typing_extensions import override from comfy_api.latest import ComfyExtension, io +logger = logging.getLogger(__name__) + class CLIPTextEncodeLongCatImage(io.ComfyNode): @classmethod @@ -61,6 +65,10 @@ class CFGRenormLongCatImage(io.ComfyNode): B, C, H, W = denoised.shape ps = 2 + if H % ps != 0 or W % ps != 0: + logger.warning(f"CFG Renorm: incompatible shape {H}x{W}, skipping renorm") + return denoised + noise = x - denoised noise_cond = x - cond_denoised