mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-12 01:07:30 +08:00
Fix potential shape missmatch in CFGRenormLongCatImage
This commit is contained in:
parent
87d0a15307
commit
4fe507248c
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user