Files
Capacap-ComfyUI-Selective-S…/__init__.py
T
capacap dcd4eafdf1 Add model-patch variant compatible with KSampler
The existing node outputs a SAMPLER and only works with SamplerCustom.
The new SelectiveSigmaDetailerPatchModelNode takes MODEL in and out,
attaching the mask-and-blend logic via set_model_unet_function_wrapper
so the same behavior works inside any sampler node.

Tradeoffs vs the SAMPLER variant: progress is measured in sigma-space
(1 - sigma/sigma_max) instead of step index since the full schedule is
not visible at the model layer; intensity is calibrated against a
fixed 16-active-step reference instead of the actual active-step
count; the cfg_scale coupling is dropped since it is not cleanly
accessible from the unet wrapper. Behavior should match the SAMPLER
variant closely near 20 steps on standard schedulers.
2026-04-21 01:11:14 +02:00

20 lines
775 B
Python

from .selective_sigma_detailer import (
SelectiveSigmaDetailerDeltaV2Node,
SelectiveSigmaDetailerPatchModelNode,
SelectiveSigmaDetailerMaskPreviewNode,
)
NODE_CLASS_MAPPINGS = {
"SelectiveSigmaDetailerDeltaV2Node": SelectiveSigmaDetailerDeltaV2Node,
"SelectiveSigmaDetailerPatchModelNode": SelectiveSigmaDetailerPatchModelNode,
"SelectiveSigmaDetailerMaskPreviewNode": SelectiveSigmaDetailerMaskPreviewNode,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"SelectiveSigmaDetailerDeltaV2Node": "Selective Sigma Detailer",
"SelectiveSigmaDetailerPatchModelNode": "Selective Sigma Detailer (Model Patch)",
"SelectiveSigmaDetailerMaskPreviewNode": "Selective Sigma Detailer Mask Preview",
}
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]