Nodes/DOGMA Nodes/DOGMA v35 Compact Whole-Object Crops
ComfyUI Node

DOGMA v35 Compact Whole-Object Crops

The crop node with nothing left to configure

By axior·Created 4 months ago·Updated 3 days ago· 1
DOGMA v35 Compact Whole-Object Crops
  • image
  • reference_image
  • masks
  • crops
  • reference_crops
  • crop_masks
  • stitch
  • info
category
group_radius80
context_px160
max_source_side4096
target_long_side3072
max_crops8
mask_threshold0.50

Here's the honest version of this page: DOGMAObjectClusterCropsV35 is a two-line subclass. In the source it is literally:

class DOGMAObjectClusterCropsV35(DOGMAObjectClusterCropsV31):
    pass

So the mechanism, the inputs, the outputs and every default are v31's. What makes v35 a version is the pair it belongs to - it's designed to be driven by DOGMAObjectSettingsV35, and the pair is what carries the v35 behaviour: v31's compact whole-object grouping, a deliberately tiny defect-only VLM request, a short front-loaded repair prompt, and a fully opaque stitch.

Why this re-release exists

The v27→v31→v34→v35 line is one author iterating on a single question: how do you get FLUX.2 Klein to repair a small object without redesigning it? Three answers stack up here.

First, grouping stays compact - 4 adjacent vehicles, 3 people, 3 architectural details, 3 street furniture, 3 faces or hands per crop, 3 by default. Never a scene-sized macro crop.

Second, the crop is still never split. Masks are thresholded, tiny ones dropped, masks over 55% of the frame rejected, boxes deduplicated at ≥0.72 IoU, groups formed greedily within group_radius (a maximum bounding-box gap), extended by context_px, snapped to /16, and downscaled as one image to target_long_side under a 3.8 MP ceiling and max_source_side as a second ceiling.

Third - and this is the actual v35 idea - the model is asked for almost nothing in the way of description. The paired settings node's request to the VLM is capped at fourteen words and forced into a DEFECT: line. A crop has one job, so the prompt has one clause. Long, descriptive local prompts are what make a local pass start reinterpreting the scene.

Inputs and outputs, unchanged from v31

image, reference_image, masks, category, then the geometry dials: group_radius (80), context_px (160), max_source_side (4096), target_long_side (3072), max_crops (8) and mask_threshold (0.5). category is the only one that changes behaviour structurally - it selects the per-crop object cap.

Outputs are the v31 outputs: crops and crop_masks as per-group lists, reference_crops sampled from reference_image at the same rectangles, stitch as the DOGMA_STITCH list of x/y/width/height/source_width/source_height/group_id/noop dicts, and info. The stitch list is not optional decoration - a stitch node that doesn't get it cannot know where to paste, and hand-building coordinates is how you get a half-pixel offset on every patch.

Install

ComfyUI Manager → search DOGMA Nodes, or clone it yourself:

cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
# restart ComfyUI

Nothing to pip install - the pack's requirements.txt is a single comment saying "No external dependencies", and the README confirms the nodes use only PyTorch and ComfyUI's built-in sampler APIs. Note that the README doesn't document this node at all; the whole semantic family ships with empty descriptions in the node list.

Practical notes

Match your versions. Using v35 crops with v27 settings works - v27 settings don't change crop geometry - but the prompt and stitch behaviour you get is whatever the settings node you picked emits. If you want defect-only prompting, take settings v35.

You are capped at one image. The code reads image[0:1], so a batch in gives a single result out. Loop outside, or run it per frame in a video pipeline.

noop means nothing happened. With no valid detections you get a centre 768px crop, a zero mask, noop: True and an info string explaining it. Stitches skip no-ops by design, so a run can "succeed" while changing nothing. That's a feature when a frame has no target objects; it's a trap when your SAM masks are bad.

CategoryDOGMA/Semantic Detailer

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
reference_imageIMAGE
masksMASK
categorySTRING
group_radiusINT800–512
context_pxINT1600–768
max_source_sideINT4096768–8192
target_long_sideINT3072768–4096
max_cropsINT81–16
mask_thresholdFLOAT0.500.01–0.99

Outputs (5)

NameTypeDescription
cropsIMAGE
reference_cropsIMAGE
crop_masksMASK
stitchDOGMA_STITCH
infoSTRING