Load Image node Mask Editor loses original image - saves black background with painted mask instead
- 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
Original image remains intact in the Load Image node
Mask is saved over existing image so that original is fed to ControlNet
Both image and mask are available as separate outputs to feed into ControlNet
### Actual Behavior
Load Image node now displays a black background with only the painted mask visible
Original image is replaced/lost
ControlNet no longer receives the original image, only black+mask
This worked correctly in previous versions
### Steps to Reproduce
Load an image using "Load Image" node
Click on the image preview to open Mask Editor
Paint/draw a mask on the image
Click "Save" in the Mask Editor
Check the Load Image node output
### Debug Logs
```powershell
No errors displayed in terminal. Mask silently replaces image with black on save.
```
### Other
- ComfyUI version: 0.3.50 and earlier worked correctly
When saving a painted mask, the Load Image node output changes from the original image to a black background with the painted mask drawn over it. The original image is completely lost and is replaced with a clipspace-painted-masked image file
Contributor guide
Research direction
Reproduce the issue from the Load Image node and its Mask Editor: paint a mask, save it, and inspect the node output. Trace the Mask Editor save path and how the Load Image node stores its image and mask. Done means the original image remains available, the mask is preserved separately, and ControlNet receives the original image rather than a black background.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100