Nodes/ComfyUI-StableManifoldCompander/Stable Manifold Estimate Drift
ComfyUI Node

Stable Manifold Estimate Drift

The old name for SMC Affine Estimate Drift — a measurement is a measurement.

By xmarre·Created 6 months ago·Updated 6 months ago· 0
Stable Manifold Estimate Drift
  • anchor_image
  • target_image
  • mask
  • scale_x
  • scale_y
  • scale_iso
  • compaction
  • translation_x_px
  • translation_y_px
  • stats_json
stable_sigma8.0
boundary_feather_px18.0
geometry_strength1.00
max_shrink0.050
max_expand0.000
anisotropy0.20

Stable Manifold Estimate Drift (class StableManifoldEstimate) is the backward-compatibility alias for SMC Affine Estimate Drift. Both class names in the pack's nodes.py resolve to the same node class - one measurement tool, two names, and the older name is there purely so workflows from the pack's earlier "Stable Manifold" era keep loading.

If you're trying to figure out why your FLUX.2 detail crop drifts - how much it expanded, which direction it slid - this is the node. Same behavior as the SMC-prefixed version, so everything in that article applies: blur both images at stable_sigma, compute a mask-weighted structure feature (Sobel gradients + luminance deviation), compare the weighted centroids and covariances, and report the drift as numbers.

Same inputs, same outputs

  • Required: anchor_image, target_image, plus the inline knobs stable_sigma (8), boundary_feather_px (18), geometry_strength (1), max_shrink (0.05), max_expand (0), anisotropy (0.2). Optional: mask.
  • Outputs: scale_x, scale_y, scale_iso, compaction, translation_x_px, translation_y_px, stats_json.

Quick interpretation cheat-sheet: scale_iso below 1.0 = the high-res output read as bigger/flatter than the anchor (the classic outward zoom drift); compaction above 1.0 = the same idea inverted - content spread and needs pulling in; translation_* = how far the structure centroid slid, in pixels.

Which name to use

Fresh workflows: use SMC Affine Estimate Drift (the current convention). Loaded workflow referencing StableManifoldEstimate: leave it alone, it works identically. The alias exists because the pack reorganized its names and chose not to break saved graphs - a small courtesy that costs you nothing. Just don't read the duplicate as "two different estimate nodes"; there's one, under two labels, and the outputs you wire into a Show Text node (or read from stats_json) are the same either way.

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. Same caveat as the current name: it's a moment-based heuristic estimate, not optical flow - treat the numbers as a trend (is it drifting, and how much) rather than a pixel-exact truth.

CategoryStableManifoldCompand/Affine

Inputs (9)

NameTypeDefaultDescription
anchor_imageIMAGE
target_imageIMAGE
stable_sigmaFLOAT8.00–64
boundary_feather_pxFLOAT18.00–256
geometry_strengthFLOAT1.000–2
max_shrinkFLOAT0.0500–0.25
max_expandFLOAT0.0000–0.25
anisotropyFLOAT0.200–1
maskoptMASK

Outputs (7)

NameTypeDescription
scale_xFLOAT
scale_yFLOAT
scale_isoFLOAT
compactionFLOAT
translation_x_pxFLOAT
translation_y_pxFLOAT
stats_jsonSTRING