If the source has negative values, the deblending procedure from photutils outputs warnings like this:
WARNING: Source "2" contains negative values, setting deblending mode to "linear" [photutils.segmentation.deblend]
It would be helpful to handle such situations within galmask itself to prevent long, verbose warning messages.
Eg:
if np.any(source < 0):
# set deblending mode to linear
else:
# keep it as default