mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-07 02:07:32 +08:00
code improve
This commit is contained in:
parent
5b996305e3
commit
089954f453
@ -71,8 +71,8 @@ class PainterNode(io.ComfyNode):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def execute(cls, mask, width, height, bg_color="#000000", image=None) -> io.NodeOutput:
|
def execute(cls, mask, width, height, bg_color="#000000", image=None) -> io.NodeOutput:
|
||||||
if image is not None:
|
if image is not None:
|
||||||
h, w = image.shape[1], image.shape[2]
|
base_image = image[:1]
|
||||||
base_image = image
|
h, w = base_image.shape[1], base_image.shape[2]
|
||||||
else:
|
else:
|
||||||
h, w = height, width
|
h, w = height, width
|
||||||
r, g, b = hex_to_rgb(bg_color)
|
r, g, b = hex_to_rgb(bg_color)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user