Nodes/DOGMA Nodes/DOGMA ReviewPair 1.0.23
ComfyUI Node

DOGMA ReviewPair 1.0.23

Actually look at what phase 3 changed, region by region

By axior·Created 6 months ago·Updated 2 days ago· 2
DOGMA ReviewPair 1.0.23
  • review
  • before_A
  • after_B
  • details
◄category_index1►
◄crop_index1►
◄view▾►
◄preview_side1536►

Automatic detailing has a quality-control problem that nobody talks about enough: the pass runs on a dozen regions, each with its own prompt and denoise, and you look at one finished image. If two of the twelve went wrong you will probably spot the bright one and miss the subtle one. This node is a microscope for that.

You give it the review the render node produced, point it at a category and a crop by index, and pick which pair you want to see. It returns two images - A before, B after - and a text block that tells you what you are looking at, what status the job had, and what prompt was used. No new generation is involved. Every comparison comes from what the render actually did.

How it works

The render node (DOGMAPhase3RenderV123) writes PNGs into a per-run folder under ComfyUI's temp directory, DOGMA_REVIEW/<uuid>/, and returns a review dictionary describing the categories in the order they were processed, each with its before/after frames and a list of crops. ReviewPair loads two of those files with PIL, thumbnails them to preview_side, and hands them back as torch tensors.

That is why the node is read-only and cheap. It is also why it has a hard dependency on the session that made the PNGs: the images live in temp, and clearing temp - or restarting ComfyUI with a cleaner that wipes it - breaks the link. The node catches exactly that case and raises a clear error telling you to re-run phase 3 to regenerate the comparisons, rather than dying with a PIL traceback.

Inputs and outputs

  • review (DOGMA_REVIEW) - from DOGMAPhase3RenderV123, or from DOGMAEmptyReviewV123 if you want the "comparisons off" path.
  • category_index (1-based) - the position in the real processing order, not the category slot number. Worth internalising: index 1 is the first category the renderer touched.
  • crop_index (1-based) - position inside that category's crop list.
  • view - one of four:
category        whole-frame before / after for that category
crop_applied    the crop region, before / after compositing
crop_generated  the raw decoded crop vs the source crop
masks           inpaint mask (A) and final blend mask (B)
  • preview_side (1536 default, 0 for native) - longest-side cap for the thumbnails only. Widgets only; it does not touch render pixels.

Outputs: before_A, after_B (IMAGE each) and details (STRING). The details string is where the value is. It lists every category in the run, every crop status in the selected category, and for crop_generated it warns you that the raw crop can differ outside the mask without that difference ever reaching the master image - which is the confusion that sends people hunting for a bug that isn't there.

Install

Part of the pack:

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

Or ComfyUI Manager → DOGMA Nodes. scipy>=1.10 is the only pip requirement, and this node does not even use it. Restart after install.

Practical notes

Set save_comparisons on the render node to true, or you get nothing to review; the stub review exists so the graph still queues in that state. Turn comparison_side down before large batches - the PNGs are written per job and a long run at native resolution fills temp fast.

Two errors you will meet, both self-explanatory if you know the mechanism. "No category in this slot" means your index exceeds the number of categories the render actually processed - which can be fewer than the categories you selected, because inactive ones are skipped before they reach the review list. And the temp-file error means the previews are gone; re-run the render.

Finally, remember what this is for. It is not a scoring node and it will not tell you whether the render is good - it shows you the actual before and after of one job at a time so you can decide, and then go back and change one denoise value instead of rerolling the whole scene.

CategoryDOGMA/v1.0.23

Inputs (5)

NameTypeDefaultDescription
reviewDOGMA_REVIEW—
category_indexINT11–128—
crop_indexINT11–1024—
viewCOMBO4 options: category, crop_applied, crop_generated, masks
preview_sideINT15360–8192—

Outputs (3)

NameTypeDescription
before_AIMAGE—
after_BIMAGE—
detailsSTRING—