Nodes/ComfyUI-MaxedOut/Match Resolution Wan 2.2 I2V MXD
ComfyUI Node

Match Resolution Wan 2.2 I2V MXD

Make your second image match your first — the WAN 2.2 way

By Maxed-Out-99·Created about a year ago·Updated 21 days ago· 9
Match Resolution Wan 2.2 I2V MXD
  • reference_image
  • image_to_match
  • matched_image
match_modecrop_to_match
enforce_wan_bucketfalse

WAN 2.2 image-to-video has a first-frame/last-frame workflow where the model needs both anchor images at the same resolution. You scale the first frame to a WAN bucket, and suddenly the second image you wanted to use doesn't match. Match Resolution Wan 2.2 I2V MXD is the pack's fix: it takes a reference image (the bucket-scaled first frame) and resizes a second image - or a whole batch - to match, so your start and end frames land on the same grid before the model ever sees them.

What you set

  • reference_image - the size source. The tooltip tells you what to use: "usually the first image after WAN bucket scaling."
  • image_to_match - the image or batch to resize into that resolution.
  • match_mode - the resize strategy, and this is where the taste lives:
    • crop_to_match (default) - resize to cover the target, then center-crop to exact size. No distortion, no letterboxing, but it crops edges. Best default.
    • fit_inside_only - resize to fit inside, no crop. Exact aspect, but the result may be smaller than the target.
    • stretch_exact - force exact size, distortion and all. Use only when you don't care about the aspect skew.
  • enforce_wan_bucket - a safety toggle. Flip it on and the node validates that the reference is actually a WAN 2.2 bucket size (832×480, 1280×720, 624×624, or 1024×1024, in both orientations). Wrong size → it errors with the valid list rather than silently producing garbage.

Output is matched_image, ready to feed into the WAN I2V encoder as the second anchor.

Why the bucket validation exists

WAN 2.2 is trained on specific buckets; generate at 923×518 and you're out of distribution even if the model runs. The node's default is lenient (enforce_wan_bucket off) because in a fast-moving workflow you might be matching against a reference that's already fine. But if you're hitting inconsistent results, flip it on once - it'll tell you immediately whether your first frame is actually bucket-legal, which is a classic silent-failure point in this pipeline. The KB's WAN guidance is blunt that resolution discipline is where the quality lives, and this node exists to automate exactly that discipline.

Gotchas

  • crop_to_match crops, full stop. If your subject is near the edge of the second image, a center-crop can amputate it - check the result before committing to a long generation run.
  • The node only resizes; it doesn't pad. The pack's separate image-scaler/padding nodes handle the pad-to-bucket case if that's the direction you need.

Install

ComfyUI Manager → search Maxed Out → install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut

No requirements.txt, no model downloads. Look for it under image/processing. If you've ever had a WAN 2.2 first/last-frame workflow that "sometimes works" - this is usually the node that was missing.

Categoryimage/processing

Inputs (4)

NameTypeDefaultDescription
reference_imageIMAGEReference size source (usually the first image after WAN bucket scaling).
image_to_matchIMAGEImage or batch to resize using the reference image resolution.
match_modeCOMBOcrop_to_matchcrop_to_match = exact size via cover+center crop; fit_inside_only = no crop, may be smaller; stretch_exact = exact size with distortion.
enforce_wan_bucketBOOLEANfalseIf enabled, reference_image must already be a WAN 2.2 bucket size.

Outputs (1)

NameTypeDescription
matched_imageIMAGE