DOGMA Category Settings v22 — Current Master Ref
Type a category, get a hand-tuned edit policy
- group_radius
- context_px
- max_source_side
- target_long_side
- max_crops
- stitch_strength
- edit_prompt
- summary
This node doesn't render anything. It's a lookup table with opinions. You give it a category name and a restoration brief, and it hands back the six numbers and the prompt that the rest of a DOGMA semantic-restoration graph runs on. If you're staring at it in a downloaded workflow wondering what to type, that's the whole job.
Why a node like this exists
The standard way to fix small broken regions is what the KB calls the detailing loop: detect a region, crop it, re-render the crop at a resolution the model can actually spend pixels on, paste it back. Impact Pack's FaceDetailer is the canonical packaging of that, and it works because faces are a narrow, well-trained target.
DOGMA does the same loop for everything in a street photo - vehicles, people, road surface, signage, sky - and the reason it needs a node like this is that each of those wants different settings. A car needs a big context window and full-strength replacement. A wall of road tarmac wants a light touch or it turns to soup. Sky should not be touched at all. Hard-coding those choices into a workflow means either a pile of widgets you re-set per category, or one settings node per category. This is the second option, as data.
How it works
It's a subclass of the older DOGMACategorySettingsV21, and that lineage is the story. V21 does a substring match on your category string to get a family, reads a table of (group_radius, context_px, max_source_side, target_long_side, max_crops, stitch_strength) for that family, and builds a policy prompt.
V22 inherits all of that and changes two things. First, it overrides the stitch strength per family: vehicles and people at 1.00, street objects 0.90, architecture 0.70, road 0.60, vegetation 0.55, water 0.45 - and sky and signage at 0.00, which means protection only. Those two are detected for masking so they don't get collateral damage, but never regenerated. Second, it rewrites the inherited prompt so the reference latent is described as the current master crop rather than the original source, so a second pass doesn't drag the image back toward an older, lower-quality version of itself. Sky and signage get a blunter replacement prompt: "SKY IS PROTECTED IN v22. Preserve the current global-master sky exactly."
The summary output states this outright - PROTECTION ONLY vs semantic repair enabled - which is the fastest way to check what you actually got.
The inputs and outputs
Two inputs:
- category - the string the family matcher reads.
- restoration_brief - a multiline string. This is your own instruction ("1970s Milan street, keep the anamorphic look"), appended to the generated policy prompt.
Eight outputs, and they're not decoration - everything downstream reads them:
- group_radius, context_px, max_source_side, target_long_side, max_crops - the cropping plan. Feed these into whichever DOGMA crop node you're running.
- stitch_strength - the alpha your stitch node uses for this category.
- edit_prompt - wire it into your text encode for the local pass.
- summary - a human-readable sanity check. Nothing consumes it; you read it.
category normally comes from a planner node upstream (a semantic plan or DOGMAFixedCategoriesV37), and restoration_brief from DOGMARestorationBriefV16. You can type the category by hand, but then nothing upstream matches the masks to it.
Install
There is nothing exotic here. requirements.txt contains one line of comment saying there are no external dependencies, and pyproject.toml declares dependencies = []. It's pure PyTorch plus ComfyUI's own APIs.
cd ComfyUI/custom_nodes
git clone https://github.com/axior/ComfyUI-DOGMA-Nodes
Restart ComfyUI, or search DOGMA Nodes in ComfyUI Manager. The author also ships it to the registry as comfy node install comfyui-dogma-nodes. No model downloads - it runs whatever Klein/Flux checkpoint the rest of your graph loads. MIT licensed.
Where people get burned
The family matcher is a substring test over a keyword list, which is fast and occasionally hilarious. "car" is in "carpet", so a category named carpet resolves to vehicles. "text" is in "texture", so wall texture resolves to signage - which in v22 is protection-only, alpha 0.00, meaning you get a summary line saying PROTECTION ONLY and a category that quietly does nothing. The summary output is the cure: read it before you blame the sampler.
Anything the matcher can't place lands in other. That's a working default, not an error, but you lose the per-category tuning that made you install this in the first place.
And a version warning, because it's real: this README documents three nodes. The module registers 157. V22 is older than V23 and V24 in this same pack, and neither of those is in the README either. Best guess is to find the newest sibling in the family - V22 is the one that keeps the current master as its reference and leaves sky and signage alone, which is exactly right if you're doing a second, gentler pass.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| category | STRING | — | |
| restoration_brief | STRING | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| group_radius | INT | — |
| context_px | INT | — |
| max_source_side | INT | — |
| target_long_side | INT | — |
| max_crops | INT | — |
| stitch_strength | FLOAT | — |
| edit_prompt | STRING | — |
| summary | STRING | — |