WorkflowX_DetailerXSelective
Repairing one region without re-running the whole chain
- final_image
- processor_images
- detailer_masks
If you found this under WorkflowX → Internal with its raw class name and no description, that's deliberate. This is the second of the two shapes DetailerX queues in its own place when you hit a processor's Play button - the one that uses a retained session, running a single processor against an image ComfyUI still holds in memory from an earlier run.
Why it exists
Here's the trade the two variants split between them. To re-run just the hand detailer, you either re-evaluate the branch that produced the image, or you reuse the tensor the server already has. The first is simple but expensive when the input is a KSampler; the second is free but only works while that tensor is alive in the running process. This node is the cheap path.
How the selection actually works
The frontend builds a trimmed graph - the DetailerX node, everything downstream of it, and only the ancestors those need - then replaces the DetailerX node with this class and fills in the fields it can't be trusted to guess: token is the live session id, job is a brand-new uuid it just queued under, and stage is the processor id.
Server-side the gate is strict: get_session(token) must resolve, the session's prompt_id must equal job, and the session must be in the queued state. Any failure gets you an error rather than a silently wrong image, which is the right call.
Then it disables every other processor in a private copy of your settings, so nothing else in the chain fires, and forces pause and skip off.
Two inputs do the interesting part:
source - original or output. original runs the processor against the image that entered DetailerX, which is what you want when the region was never right in the first place. output runs it against the latest completed result - including the result of a previous selective refinement, so repairs stack: every successful run becomes the new latest output, and refine the eyes on top of a refined face is a normal move.
mask_mode - reuse or remask. This one only appears in the detailer menu, because it only means something for a detector-based stage. reuse takes that detailer's most recent final blend mask - the feathered one DetailerX Masks showed you - and resamples through it, so the region is preserved exactly and the detector never runs. remask re-runs Ultralytics and SAM on the latest image first, which is what you want when the geometry moved and the old mask no longer sits on the anatomy. Reused masks get resized if needed and split into connected regions, so unrelated detections stay independent; if a compatible mask is gone, reuse falls back to fresh detection and says so instead of failing.
settings is the same version 5 JSON blob DetailerX carries, and stage has to be present in its order list.
Outputs
The same three types as the parent node, scoped down to one stage. final_image is the refinement result. processor_images is a one-entry bundle labelled with what ran - selective · original input, selective · latest output · reused mask. detailer_masks carries that stage's detector/refined/blend masks, or nothing for a processor like DLSS5 or LUT that has no mask step.
Install
ComfyUI Manager → WorkflowX-Configurator, or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/haroonaslam/WorkflowX-Configurator
Restart and hard-refresh so the frontend Play buttons exist; the backend alone can't queue a selective run. DetailerX needs ultralytics, segment-anything, opencv-python, spandrel, hydra-core and iopath, plus its SAM and detector assets from the pack's WorkflowX Downloader node.
Common issues
Retained inputs unavailable. Run the ordinary workflow again. is the big one, with two causes that look identical: you placed the node by hand (there's no session behind the token), or ComfyUI restarted since the run. Retained sessions are process-local and bounded - 32 of them, about 2GB of tensors - and the oldest get evicted as new runs come in, so a long session can age your base image out from under you.
Selective refinement session is stale; choose the processor play action again. means the token resolved but the job id didn't match, typically a re-queued old prompt. Latest DetailerX output is unavailable. Complete an ordinary run first. is the output source before anything has completed. And Processor is no longer available: <stage> means you hid or deleted the processor between queueing and execution.
The practical takeaway: never hand-build these - the frontend creates the session, the token and the job id together, and you can't fabricate any of them from the canvas.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| token | STRING | — | |
| settings | STRING | — | |
| job | STRING | — | |
| stage | STRING | — | |
| source | COMBO | 2 options: original, output | |
| mask_mode | COMBO | 2 options: reuse, remask |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| final_image | IMAGE | — |
| processor_images | DETAILERX_PROCESSOR_IMAGES | — |
| detailer_masks | DETAILERX_MASKS | — |