MCPcopy Create free account
hub / github.com/BadCafeCode/masquerade-nodes-comfyui / convert

Method convert

MaskNodes.py:451–457  ·  view source on GitHub ↗
(self, image, method)

Source from the content-addressed store, hash-verified

449 CATEGORY = "Masquerade Nodes"
450
451 def convert(self, image, method):
452 if method == "intensity":
453 if len(image.shape) > 3 and image.shape[3] == 4:
454 image = tensor2rgb(image)
455 return (tensor2mask(image),)
456 else:
457 return (tensor2rgba(image)[:,:,:,0],)
458
459class MixByMask:
460 def __init__(self):

Callers

nothing calls this directly

Calls 3

tensor2rgbFunction · 0.85
tensor2maskFunction · 0.85
tensor2rgbaFunction · 0.85

Tested by

no test coverage detected