mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-06 06:57:05 +08:00
Fix: image.shape accessed before image is null-checked (#134)
This commit is contained in:
parent
c0a348d778
commit
0b0eead4ae
@ -427,10 +427,10 @@ class OpenAIGPTImage1(ComfyNodeABC):
|
||||
files.append(("image[]", img_binary))
|
||||
|
||||
if mask is not None:
|
||||
if image.shape[0] != 1:
|
||||
raise Exception("Cannot use a mask with multiple image")
|
||||
if image is None:
|
||||
raise Exception("Cannot use a mask without an input image")
|
||||
if image.shape[0] != 1:
|
||||
raise Exception("Cannot use a mask with multiple image")
|
||||
if mask.shape[1:] != image.shape[1:-1]:
|
||||
raise Exception("Mask and Image must be the same size")
|
||||
batch, height, width = mask.shape
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user