comfyui_upload_mask
Upload a mask image to ComfyUI, merging its alpha channel with an existing original image for precise editing or compositing.
Instructions
Upload a mask image to ComfyUI.
The mask's alpha channel is merged into the original image's alpha channel by the ComfyUI server. The original image must already exist in ComfyUI. Defaults to ComfyUI's input directory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Name for the uploaded mask file (e.g. 'mask.png') | |
| mask_data | Yes | Base64-encoded mask image data | |
| overwrite | No | If True, replace any existing file with the same name. If False (default), ComfyUI auto-renames by suffixing ' (N)'. | |
| subfolder | No | Optional subfolder for the mask file | |
| destination | No | Destination directory. 'input' (default) is where workflows read user-supplied masks from; 'output' and 'temp' are usually only useful for testing or scripted setups. | input |
| original_image | Yes | Filename of the original image the mask applies to (must already exist in ComfyUI's input directory) | |
| original_subfolder | No | Optional subfolder of the original image |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |