AV ComfyUI Manual
14 / 64
Files
14
PART I · WORKFLOW ENGINEERING FOR COMFYUI

Checkpoints & Debugging — finding the last provably correct stage

A large workflow cannot be diagnosed from the final image alone. Reliable debugging is a ladder of checkpoints: after each meaningful module there should be an observable result that tells you exactly where the pipeline stopped being correct.

CONFIRMEDThis method matches the documented Hansen probes: preprocessors, SDXL, masks, PEOPLE, main FLUX and output all expose intermediate preview/comparer points.
FIVE-PROBE TEST

The last correct preview determines the next check

1
409Generateraw PPL decode
2
113DetectFlorence2 preview
3
507 / 508Cropsource + mask
4
480CompositeMASK / PPL
5
730Current finaldecode 53

If stage N is correct, do not return to the prompt; inspect the connection and parameters of stage N+1.

01 · OBSERVABILITY

If a module cannot be observed independently, it is difficult to debug

PreviewImage, MaskPreview, comparer, text/json preview and save probes are not decorative. They create observability: the ability to inspect data before it becomes mixed with the next system.

The longer the chain without a checkpoint, the more possible causes can produce the same final failure.

02 · LAST GOOD STAGE

The key debugging question: where is the last correct result?

Do not begin with “why is the final image wrong?” Start at the end and move upstream until you reach the last checkpoint that looks correct and behaves correctly in the graph.

The next stage becomes the first suspect. This reduces the search space from hundreds of nodes to one branch.

03 · CHECKPOINT TYPES

Different data types need different probes

DataCheckpointWhat to verify
IMAGEPreviewImage / comparerpixels, composition, color, geometry
MASKMaskPreviewsilhouette, polarity, holes, bounds
BBOX / JSONtext/json previewcoordinates, count, labels
STRINGtext previewassembled prompt / control text
LATENTusually a decode-only debug pathvisual result after VAE Decode
OUTPUT FILESaveImage + actual file checkwhether the delivery path really worked
04 · DEBUG LADDER

Debug in dependency order

05 · MINIMAL REPRODUCTION

Enable the smallest set of modules that reproduces the problem

BASE CONFIG should allow everything unrelated to the failure to be disabled. If you are testing a SAM2 mask, there is no reason to run main FLUX and upscale at the same time.

A minimal runtime speeds up iteration and reduces the chance that a side branch hides the real source of the failure.

06 · ERROR CLASSIFICATION

Classify the failure before changing parameters

ClassExamplesFirst action
Dependencymissing node / model / loaderCheck manifest and paths
Type contractIMAGE vs LATENT / missing CONDITIONINGCheck socket types
Spatial contractmask shift / bbox mismatchCheck W×H and coordinate space
Batch contractindex out of bounds / cardinality mismatchCheck batch counts
Routingwrong source / branch has no effectCheck selector + bypass
Generation qualityanatomy / material / prompt mismatchTune AI parameters only after the technical preflight passes
07 · ANTI-PATTERN

Do not treat topology problems with generation parameters

If a mask is shifted because of a resize mismatch, changing denoise will not help. If a selector chose the wrong source, the prompt cannot repair the route. If CLIP input is missing, CFG is irrelevant.

Production debugging starts with architecture and data contracts, then moves to generation tuning.

08 · DEBUG RECORD

Record the test state so debugging can be repeated

  • Which input was used.
  • Which modules are enabled in BASE CONFIG.
  • Effective selector values.
  • Seed and sampling parameters.
  • Dimensions and batch at the failing stage.
  • Last correct checkpoint.
  • Exact error message / node ID.
09 · PRACTICE

Practice: break a branch deliberately and localize the fault

Take a small standalone workflow with three checkpoints. Deliberately break one contract — for example the selector source or mask size. Do not fix it immediately. Walk the debug ladder and record the first checkpoint where the result diverges.

INFERRED

Readiness criterion

A learner has internalized debugging when they can name the last correct stage and the class of failure before changing the prompt or sampler.