Paint Bucket may stop short when pixels beyond the filled area differ too much in color at the current tolerance, or when the intended area is not connected to the pixel you clicked. The tool fills a connected region based on color similarity; it does not simply select every visually related object. Increase or decrease tolerance according to what the fill actually includes, and click an already-masked area when you intend to erase mask from it. ComfyUI’s Mask Editor documentation describes this behavior.
What the fill is responding to
Paint Bucket is a mask tool. Clicking a pixel starts a flood fill that spreads through a connected region according to color similarity. Tolerance controls how broadly that fill spreads. This gives you two separate things to diagnose: whether the pixels you want are similar enough to the clicked pixel, and whether they are connected to it as a fillable region.
A visible outline does not necessarily mean every pixel inside it has a uniform color. Shading, texture, antialiasing, or a narrow gap can change which pixels are similar or connected. Those are image conditions to inspect, not guarantees about how a particular image will fill.
Adjust the fill in order
- Select Paint Bucket in the Mask Editor and inspect the image at the area you want to mask. Choose a click point inside the intended region, away from its visible edge.
- Click once and compare the mask with the intended boundary. Note where it stops or where it spills; do not judge only by how much of the image changed.
- If the fill stops inside a region that appears connected, raise tolerance in a small increment and try again. A broader color match may include more pixels, including pixels you did not intend.
- If the fill crosses the boundary into a neighboring area, lower tolerance and repeat from a point inside the target. A lower setting may leave variations within the target unfilled.
- If a visible gap separates the missed part from the filled part, treat connectivity as the likely obstacle. Changing tolerance may not make a disconnected area part of the same fill. Click that area separately if it is an appropriate region to mask.
- To remove mask from an area already masked, click that masked area with Paint Bucket. Check that the result removes mask where intended rather than adding it.
Use Undo if a trial gives an unwanted result, then adjust one condition at a time. The editor documents undo as an available action; the exact tolerance control range and step size are not specified in the supplied documentation, so use the controls actually shown in your editor rather than assuming numerical values. The tool description also distinguishes Paint Bucket from Color Select, which selects matching colors using Simple HSL or LAB options.
A diagnostic table for one image
The observations below are hypothetical. They illustrate how to decide what to try; they are not measured results or recommended numeric settings.
| Hypothetical observation | Likely issue to check | Next action | Acceptance check |
|---|---|---|---|
| A flat, connected blue region fills except for a slightly different-shade patch | The patch may fall outside the current color-similarity range | Raise tolerance slightly and retry | The patch joins the mask without crossing the intended outline |
| A thin gap separates a missed blue section from the clicked section | The sections may not be connected for the fill | Click inside the missed section separately | Each intended section is masked, while the gap remains unmasked |
| The fill spills from the target into a neighboring pale area | The current match may be too broad for that boundary | Undo, lower tolerance, and retry | The neighboring area stays unmasked and the target is adequately covered |
| A click on a dark masked patch removes mask there | The click is acting on an already-masked area | Inspect the boundary and undo if the removal was too broad | Only the intended portion of the existing mask is removed |
For example, suppose a hypothetical target has a shaded edge and the first click fills its central flat color but not the edge. First check whether the edge is connected to the center. If it is, try a modest tolerance increase and watch the neighboring background. If it is separated by a gap, test it with a separate click instead of continuing to broaden the fill.
When the bucket is the wrong fit
Stop increasing tolerance when the fill begins crossing a boundary you need to preserve. A connected fill is governed by both color similarity and connectivity; tolerance is not a general-purpose object detector and may not bridge a disconnected region. For disconnected areas, separate clicks may be more controlled. For selecting pixels by matching a color across the image, the editor also offers Color Select, with Simple HSL and LAB matching methods. The documentation does not specify the exact selection scope or guarantee that either method suits a particular image, so compare the actual preview before saving.
If you cannot get useful coverage without spill, switch to Mask Pen for the remaining area and Eraser to refine the boundary. These tools are documented as drawing and erasing mask regions; they do not make a failed bucket fill more selective automatically. Check the mask layer’s visibility and appearance as needed, and use Undo or Redo to compare a trial with the prior state. Save only after the visible mask matches the intended region; saving closes the editor, while Cancel closes without saving.
Common questions
Does higher tolerance always fill the whole object?
No. It broadens the color-similarity fill, but the fill still depends on connectivity. A separate region may remain untouched, and a broad match can spill into adjacent pixels.
Why did clicking the same area erase mask?
The documented Paint Bucket behavior is to erase from the mask when you click an already-masked area. Check the resulting boundary and use Undo if the removal was not intended.
Should I use Paint Bucket or Color Select?
Use Paint Bucket when you want a connected, color-similar region from a chosen starting pixel. Consider Color Select when the task is matching a target color with its Simple HSL or LAB options. The right choice depends on the image and the mask you need; inspect the result rather than assuming either tool selects the intended object.
Sources and next step
This guide interprets public documentation and uses explicitly hypothetical acceptance examples, not application tests. Controls and availability can change; verify the cited manual against your installed version.
For work created in Imagild, carry the input requirements and acceptance checklist into the photo editor. The external software controls discussed above belong to their respective products.