Gemini Combine Seg Masks
Union two masks (no Gemini, no key)
- mask1
- mask2
- mask
The name oversells it. This node has nothing to do with Gemini, calls no API, and needs no key - it carries the "Gemini" prefix purely because it lives in the ComfyUI-OllamaGemini pack. What it does is dead simple and quietly essential: it unions two masks into one.
It's a straight duplicate of the pack's CombineMasks node (CombineSegMasks), just registered in a different submenu. Same behavior, same ports.
Why you'd use it
Text-prompted masking works one concept at a time. The pack's CLIPSeg / Gemini CLIPSeg nodes take a single word - "hair", "dress", "background" - and return one mask. So to edit two things together, you mask each separately and then merge. That merge is this node. Run CLIPSeg twice, drop both masks in here, and you get a single selection covering both regions for your inpaint or composite step.
Core ComfyUI and the Impact Pack have equivalent mask-combine nodes; this is the one that ships inside OllamaGemini, so it's here when that's the pack you already have loaded.
How it works
It's a union: any pixel masked in either input ends up masked in the output. There's no subtract or intersect option - it's an OR of the two masks, nothing more.
The inputs and outputs
Three ports, no settings:
mask1andmask2- the twoMASKinputs to join.mask- the combinedMASKoutput.
Send the result wherever a mask is consumed: a Set Latent Noise Mask, a composite, or another combine node when you're stacking more than two.
Installing it
Install the ComfyUI-OllamaGemini pack - ComfyUI Manager (search the name, install, restart) or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/al-swaiti/ComfyUI-OllamaGemini
pip install -r requirements.txt
then restart. No models, no credentials - it only manipulates masks you already have.
Where people get burned
It takes exactly two masks, so to combine three or more you chain it: the output of one combine becomes an input to the next. It composes, it just doesn't accept a list.
The two masks should also share dimensions; feed it masks made from differently-sized images and they may misalign or clip rather than throwing a clean error, so keep your mask sources at one resolution. If you actually need to subtract one mask from another or keep only their overlap, this isn't the node - use a mask op from core or the Impact Pack that exposes those modes. And since this is identical to CombineMasks, there's no reason to prefer one over the other beyond which menu you're already in.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mask1 | MASK | — | |
| mask2 | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |