1 Star 0 Fork 15

雪狐/ComfyUI_Lam_1

forked from yanlang0123/ComfyUI_Lam 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ImageToMasks.py 625 Bytes
一键复制 编辑 原始数据 按行查看 历史
马噥 提交于 2023-07-17 21:32 +08:00 . 修改,新增
class ImageToMasks:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"image": ("IMAGE",),
"channel": (["red", "green", "blue"],),
}
}
CATEGORY = "mask"
RETURN_TYPES = ("MASK",)
FUNCTION = "image_to_mask"
def image_to_mask(self, image, channel):
channels = ["red", "green", "blue"]
mask = image[:, :, :, channels.index(channel)]
return (mask,)
NODE_CLASS_MAPPINGS = {
"ImageToMasks": ImageToMasks
}
NODE_DISPLAY_NAME_MAPPINGS = {
"ImageToMasks": "图片转mask批量"
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/assassindesign/ComfyUI_Lam_1.git
git@gitee.com:assassindesign/ComfyUI_Lam_1.git
assassindesign
ComfyUI_Lam_1
ComfyUI_Lam_1
cu121

搜索帮助