Wan Video Frame Scaler
The one you actually want for img2vid — and its 720p trap
- image
- scaled_image
- scaled_size
Wan Video Frame Scaler is the node most people installing this pack are actually after: you have a still image, you want to feed it into a Wan 2.1 img2vid workflow, and you need it at a resolution Wan will accept. It takes the image, scales it to a Wan-friendly bucket - 720p (1280x720) or 480p (854x480), or a custom size you define - and hands you back the scaled image plus the exact size as a string so you can wire the dimensions into the sampler. For a single starting frame, it's the cleanest path from "random screenshot" to "Wan-ready input."
It matters because Wan, like most video diffusion models, is picky about its input. Native resolutions hover around 480p and 720p, and the VAE wants dimensions that divide cleanly; feed it an arbitrary 1431x2210 still and you're asking for trouble. This node snaps the image to a known-good bucket and tells you what it landed on.
How it works - and the trap
The mechanism is the same fill-based scaling as the pack's Smart Aspect Scaler: compute the scale to cover the target, keep the aspect ratio, round to a multiple of 64 (unless you turn force_multiple_64 off), resize with LANCZOS, then apply fit_strategy (resize default, pad, crop).
Here's the trap: the 720p and 480p presets are landscape buckets. 720p means the target is 1280x720 - a 16:9 shape. With the default resize strategy, the node preserves your image's aspect ratio, so a portrait or square image does not come out at 1280x720. Feed it a 1000x2000 portrait and you get 1280x2560, because the node filled the width and kept the portrait shape. Only pad or crop force the literal 1280x720 - with black bars or a big center crop respectively. This is the number-one confusion point with this node, and it's right there in the code.
So the practical rule: 16:9-ish landscape sources → use the 720p/480p presets. Portrait or square sources → use Custom (the custom_width/custom_height fields, which default to 1280x720) or skip this node and use Smart Aspect Scaler's Wan Medium/Large presets, which include portrait variants. The scaled_size string output always tells you the truth about what came out - trust it over the preset name.
Inputs and outputs that matter
You set wan_resolution (720p, 480p, or Custom), optionally custom_width/custom_height when Custom is selected, and fit_strategy for how to handle the mismatch (see above). Leave force_multiple_64 on. Outputs are scaled_image (the ready frame) and scaled_size (a string like "1280x720" - wire it into Size Parser for integer width/height if your Wan setup needs them).
One side note: 480p is 854x480, and 854 isn't a multiple of 64. That's fine - it's the official Wan 2.1 480p resolution, and the node will happily produce it with pad/crop. Don't let the multiple-of-64 toggle make you think 854 is a mistake.
Installation
Part of the comfyui-smart-scaler pack: ComfyUI Manager → search comfyui-smart-scaler → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/babydjac/comfyui-smart-scaler.git
pip install torch Pillow numpy
Light dependencies (torch, Pillow, numpy), no model downloads. It lives under SmartScaler/Video in the node menu.
Common issues
The portrait-source problem above is by far the most common "it's not working." The second is forgetting this node handles a single frame - feed it a whole video batch and it only processes the first frame. For vid2vid you want Batch Frame Processor from the same pack, which applies one consistent scale across every frame so the whole clip matches. And if you're getting weird dimensions you didn't ask for, check the scaled_size output before you blame the sampler - the node may have decided your image is portrait and filled accordingly.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| wan_resolution | COMBO | 720p | 3 options: 720p, 480p, Custom |
| custom_width | INT | 128064–4096 | — |
| custom_height | INT | 72064–4096 | — |
| fit_strategy | COMBO | resize | 3 options: resize, pad, crop |
| force_multiple_64opt | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| scaled_image | IMAGE | — |
| scaled_size | STRING | — |