mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-06-14 11:59:21 +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
|
import torch
|
||||||
from typing_extensions import override
|
from typing_extensions import override
|
||||||
from comfy_api.latest import ComfyExtension, io
|
from comfy_api.latest import ComfyExtension, io
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class CLIPTextEncodeLongCatImage(io.ComfyNode):
|
class CLIPTextEncodeLongCatImage(io.ComfyNode):
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -61,6 +65,10 @@ class CFGRenormLongCatImage(io.ComfyNode):
|
|||||||
B, C, H, W = denoised.shape
|
B, C, H, W = denoised.shape
|
||||||
ps = 2
|
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 = x - denoised
|
||||||
noise_cond = x - cond_denoised
|
noise_cond = x - cond_denoised
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user