mirror of
https://git.datalinker.icu/kijai/ComfyUI-KJNodes.git
synced 2026-04-09 22:36:58 +08:00
Fix mask_color widget in ImageAndMaskPreview node
This commit is contained in:
parent
2fb0ee4934
commit
1f03079338
@ -873,9 +873,9 @@ nodes for example.
|
||||
mask_image = mask.reshape((-1, 1, mask.shape[-2], mask.shape[-1])).movedim(1, -1).expand(-1, -1, -1, 3).clone()
|
||||
|
||||
color_list = list(map(int, mask_color.split(', ')))
|
||||
mask_image[:, :, :, 0] = color_list[0] // 255 # Red channel
|
||||
mask_image[:, :, :, 1] = color_list[1] // 255 # Green channel
|
||||
mask_image[:, :, :, 2] = color_list[2] // 255 # Blue channel
|
||||
mask_image[:, :, :, 0] = color_list[0] / 255 # Red channel
|
||||
mask_image[:, :, :, 1] = color_list[1] / 255 # Green channel
|
||||
mask_image[:, :, :, 2] = color_list[2] / 255 # Blue channel
|
||||
|
||||
preview, = ImageCompositeMasked.composite(self, image, mask_image, 0, 0, True, mask_adjusted)
|
||||
if pass_through:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user