SMC Affine Profile
21 knobs for the affine correction path, all in one box.
- profile
- profile_json
SMC Affine Profile (class SMCAffineProfile) is the settings object for the pack's affine/diagnostic correction path. It doesn't process an image - it builds an SMC_PROFILE dict with 21 parameters that the affine compand nodes and the Impact Pack hook read. Think of it as the older, more explicit cousin of SMC Config: same idea (a config object), but for the path that estimates actual scale/translation drift instead of the anchor-guided radial flow.
It's genuinely a lot of knobs, and you will not touch most of them. Here's the honest breakdown.
The ones that actually matter
geometry_strength(0–2, default 1.0) - how much of the estimated drift to apply as geometry correction. Your master dial.max_shrink(0–0.25, default 0.05) andmax_expand(0–0.25, default 0) - safety caps. Defaults mean "shrink up to 5%, never expand" - the correction is allowed to pull content inward but never blow it up. If you want the affine path to also undo an over-tight crop, you'd have to raisemax_expand.anchor_pull(0–1, default 0.18) - how much of the anchor's actual colors get blended into the corrected low-frequency result. The "trust the reference" dial.contrast_strength(default 0.85) andchroma_strength(default 0.95) - how hard tone and color are pulled toward the anchor's statistics.boundary_tether(0–1, default 0.35) - keeps the mask's boundary ring glued to the original's low-frequency content, so the corrected region doesn't visibly separate from the frame. If you see seams, this is a knob to raise.assume_srgb(default true) - the node converts sRGB→linear→Oklab for the color work. Keep it true unless your pipeline is already linear.blend_back_to_target(default true) - if on, the corrected pixels are pasted back only inside the mask so the outside stays untouched.
The rest
stable_sigma (8) and detail_sigma (8) control the Gaussian blur used for drift estimation and the detail re-add; boundary_feather_px (18) and interior_power (1.35) shape the interior weighting; translate_strength (1), anisotropy (0.2), mean_strength (1), compaction_to_chroma (0.22), detail_retain (1), and mask_global_strength (1) are the fine-grained versions of the ideas above. Leave them alone until something specific misbehaves.
Outputs
profile(SMC_PROFILE) - wire into SMC Affine Compand'sprofileport, or theprofileinput of the self-anchor hook providers.profile_json- the same dict as pretty-printed JSON, for reading or saving.
If you don't connect a profile anywhere, the affine nodes fall back to these defaults internally - so the profile is only mandatory when you want something other than defaults.
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 trap with 21 knobs is convincing yourself each one needs attention - the defaults are well-chosen for the FLUX.2 drift case, so change two or three at a time and use profile_json to record what you settled on.
Inputs (19)
| Name | Type | Default | Description |
|---|---|---|---|
| stable_sigma | FLOAT | 8.00–64 | — |
| detail_sigma | FLOAT | 8.00–64 | — |
| boundary_feather_px | FLOAT | 18.00–256 | — |
| interior_power | FLOAT | 1.350.1–8 | — |
| geometry_strength | FLOAT | 1.000–2 | — |
| translate_strength | FLOAT | 1.000–2 | — |
| max_shrink | FLOAT | 0.0500–0.25 | — |
| max_expand | FLOAT | 0.0000–0.25 | — |
| anisotropy | FLOAT | 0.200–1 | — |
| mean_strength | FLOAT | 1.000–2 | — |
| contrast_strength | FLOAT | 0.850–2 | — |
| chroma_strength | FLOAT | 0.950–2 | — |
| anchor_pull | FLOAT | 0.180–1 | — |
| compaction_to_chroma | FLOAT | 0.220–1 | — |
| detail_retain | FLOAT | 1.000–2 | — |
| mask_global_strength | FLOAT | 1.000–1 | — |
| boundary_tether | FLOAT | 0.350–1 | — |
| assume_srgb | BOOLEAN | true | — |
| blend_back_to_target | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| profile | SMC_PROFILE | — |
| profile_json | STRING | — |