Comfy-Org / Comfy-Org/ComfyUI

Join Image With Alpha node does not work with image batching

Open
#12,580 0 comments 1 reaction 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

When passing a batch of images to the `Join Image with Alpha` node, it should return a batch of images.

### Actual Behavior

The `Join Image with Alpha` node always returns a single image.

### Steps to Reproduce

1. Run this workflow: [Bug.json](https://github.com/user-attachments/files/25470595/Bug.json)
2. Notice that it only returns a single image.

### Debug Logs

```powershell
[START] Security scan
[ComfyUI-Manager] Using uv as Python module for pip operations.
Using Python 3.10.16 environment at: env
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2026-02-21 16:00:03.213
** Platform: Linux
** Python version: 3.10.16 | packaged by conda-forge | (main, Dec 5 2024, 14:16:10) [GCC 13.3.0]
** Python executable: /home/pauan/.config/pinokio/api/comfy.git/app/env/bin/python
** ComfyUI Path: /home/pauan/.config/pinokio/api/comfy.git/app
** ComfyUI Base Folder Path: /home/pauan/.config/pinokio/api/comfy.git/app
** User directory: /home/pauan/.config/pinokio/api/comfy.git/app/user
** ComfyUI-Manager config path: /home/pauan/.config/pinokio/api/comfy.git/app/user/default/ComfyUI-Manager/config.ini
** Log path: /home/pauan/.config/pinokio/api/comfy.git/app/user/comfyui.log
Using Python 3.10.16 environment at: env
Using Python 3.10.16 environment at: env

Prestartup times for custom nodes:
0.2 seconds: /home/pauan/.config/pinokio/api/comfy.git/app/custom_nodes/ComfyUI-Manager

WARNING: You need pytorch with cu130 or higher to use optimized CUDA operations.
Checkpoint files will always be loaded safely.
Total VRAM 15838 MB, total RAM 96175 MB
pytorch version: 2.7.0+cu128
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 5070 Ti : cudaMallocAsync
Using async weight offloading with 2 streams
Enabled pinned memory 91365.0
Using pytorch attention
Python version: 3.10.16 | packaged by conda-forge | (main, Dec 5 2024, 14:16:10) [GCC 13.3.0]
ComfyUI version: 0.14.1
ComfyUI frontend version: 1.39.14
[Prompt Server] web root: /home/pauan/.config/pinokio/api/comfy.git/app/env/lib/python3.10/site-packages/comfyui_frontend_package/static
### Loading: ComfyUI-Manager (V3.37.2)
[ComfyUI-Manager] network_mode: public
### ComfyUI Version: v0.14.1-24-g7591d781 | Released on '2026-02-21'
```

### Other

This is happening because the images are batched, but the mask is a single value.

However, this shouldn't be a problem, because every other node in ComfyUI is able to correctly combine a batch with a single value.

For example, when passing a batch of images to the `ImageCompositeMasked` node, it returns a batch of images, even if the `source` and `mask` are a single value.

So the behavior of `Join Image with Alpha` is different from every other node in ComfyUI.

In addition, the `RepeatMaskBatch` node doesn't exist, so there is no easy way for the user to fix the incorrect behavior of `Join Image with Alpha`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.