ComfyUI Node

SMC Anchor Resolution

What size is a 1-megapixel version of my image?

By xmarre·Created 6 months ago·Updated 6 months ago· 0
SMC Anchor Resolution
  • image
  • anchor_height
  • anchor_width
  • summary
target_mp1.00
round_to16

SMC Anchor Resolution (class SMCAnchorResolution) is the pack's calculator. It answers one question: "If I downscale this image to N megapixels while keeping the aspect ratio and rounding to a clean multiple, what width and height do I get?" It doesn't resize anything - it just tells you the numbers.

In the Stable Manifold Compander ecosystem this is the boring-but-useful sibling of SMC Make Anchor. Where Make Anchor produces the actual anchor image, this node produces the dimensions you'd use to build one yourself, or just a human-readable summary of what the anchor should be.

Inputs

  • image - any image. Only its height and width are used.
  • target_mp (0.1–4, default 1.0) - the megapixel target. The default of 1.0 matches the pack's assumption that around 1MP is the FLUX.2 model's stable regime where composition stops drifting.
  • round_to (1–128, default 16) - dimensions round to a multiple of this. Keeping it at 16 keeps the anchor friendly to models and VAEs that want multiples of 16.

Outputs

  • anchor_height (INT) and anchor_width (INT) - the computed dimensions. Wire these into any resize node if you want to build the anchor yourself with your own resize method.
  • summary - a string like 1024x1024 (~1.048 MP) so you can glance at the result without a text node.

That's the whole node. It's one of those things you'll reach for when you're setting up a workflow and want to confirm, say, that a 1792x1392 input at 1MP anchor rounds to 1408x1104 before you commit to an anchor size in SMC Config.

Install & gotchas

Same pack, same trivial install:

cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-StableManifoldCompander

or ComfyUI Manager, searching "Stable Manifold Compander". No dependencies beyond a normal ComfyUI install. The only thing to watch: target_mp is megapixels with a min of 0.1 - you can't ask for a 0.05MP anchor here, unlike the affine path's target_megapixels which goes down to 0.01. And remember the rounded result is rarely exactly the target MP; the summary shows the real number, so trust it over the input.

CategoryStableManifoldCompand/Utility

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
target_mpFLOAT1.000.1–4
round_toINT161–128

Outputs (3)

NameTypeDescription
anchor_heightINT
anchor_widthINT
summarySTRING