mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-06 14:07:09 +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))
|
files.append(("image[]", img_binary))
|
||||||
|
|
||||||
if mask is not None:
|
if mask is not None:
|
||||||
if image.shape[0] != 1:
|
|
||||||
raise Exception("Cannot use a mask with multiple image")
|
|
||||||
if image is None:
|
if image is None:
|
||||||
raise Exception("Cannot use a mask without an input image")
|
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]:
|
if mask.shape[1:] != image.shape[1:-1]:
|
||||||
raise Exception("Mask and Image must be the same size")
|
raise Exception("Mask and Image must be the same size")
|
||||||
batch, height, width = mask.shape
|
batch, height, width = mask.shape
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user