Stable Manifold Compand
The old name for SMC Affine Compand. Same correction, two labels.
- anchor_image
- target_image
- mask
- original_image
- profile
- corrected
- warped_target
- diagnostics
- stats_json
Stable Manifold Compand (class StableManifoldCompand) is the backward-compatibility alias for SMC Affine Compand. In the pack's nodes.py, both class names point at the same node class - so if your saved workflow references StableManifoldCompand, you're already running the affine correction path, just under the earlier "Stable Manifold" name.
The story is the pack's own reorganization: the affine/profile nodes shipped first with the "Stable Manifold" prefix, and when the author reorganized the pack under the SMC prefix and added the newer anchor-guided path, the old class names stayed registered as aliases so existing workflows wouldn't silently break. The comment in the source is blunt about it: "Backward-compat aliases from the earlier pack." Same node, new label - nothing else changed.
What it actually does
Everything described in the SMC Affine Compand article applies verbatim:
anchor_image+target_imagerequired; optionalmask,original_image, andprofile.- Outputs:
corrected,warped_target,diagnostics,stats_json.
In short: it blurs both images, fits an affine (scale + translation) that maps the target's structure onto the anchor's, warps the target inward along it (clamped so it never expands beyond max_expand), restores low-frequency color in Oklab toward the anchor, re-adds detail, and pastes back inside the mask. The diagnostics panel - anchor | target | corrected | heatmap - is the reason people reach for this path over the anchor-guided one: it shows you exactly where pixels moved.
Which one should you use?
If you're building fresh, use the SMC-prefixed name; that's the current convention and where new examples and docs point. If a shared workflow references StableManifoldCompand, leave it be - it runs the same code. The only real downside of the alias is confusion: seeing both names in the node list, you might think one is newer or better. It isn't. And don't mistake it for SMC Anchor-Guided Compand (SMCCompand), which is the newer primary workflow node with a different mechanism - that one derives a radial flow from the mask and needs an SMC_CONFIG; this one fits an affine and takes an explicit anchor.
Install & gotchas
Same pack, trivial install:
cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-StableManifoldCompander
or ComfyUI Manager (search "Stable Manifold Compander"). No extra dependencies. The one gotcha carries over from the affine path: max_expand defaults to 0, so the correction will never grow content - if things look shrunken, lower geometry_strength rather than fighting the clamp.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| anchor_image | IMAGE | — | |
| target_image | IMAGE | — | |
| maskopt | MASK | — | |
| original_imageopt | IMAGE | — | |
| profileopt | SMC_PROFILE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| corrected | IMAGE | — |
| warped_target | IMAGE | — |
| diagnostics | IMAGE | — |
| stats_json | STRING | — |