Acly / comfyui-tooling-nodes

Nodes for using ComfyUI as a backend for external tools. Send and receive images directly without filesystem upload/download.
GNU General Public License v3.0
319 stars 38 forks source link

Allow ApplyMaskToImage handle multiple masks #11

Closed huchenlei closed 8 months ago

huchenlei commented 8 months ago

Before, ApplyMaskToImage was assuming that mask has batch size == 1. This PR make ApplyMaskToImage able to handle the task of applying N masks to N images.

This behaviour is necessary in https://github.com/huchenlei/ComfyUI-layerdiffusion as LayerDiffusionDecode outputs multiple masks.

03 03 2024_19 14 36_REC

Related PR: https://github.com/huchenlei/ComfyUI-layerdiffusion/pull/4

Acly commented 8 months ago

Thanks, this is more flexible. Since Comfy added "Join Image With Alpha" this node isn't strictly needed, but I guess I'll keep it around as some things are more convenient and don't require extra steps.

Checking out layer diffusion now :)