Nodes/ComfyUI/ScaleROPE
ComfyUI Node Runs on cloud

ScaleROPE

The fix for pushing a video model past its native resolution

By Comfy-Org·Created 4 years ago·Updated about 10 hours ago· 130,663
ScaleROPE
  • model
  • MODEL
scale_x1.0
shift_x0.0
scale_y1.0
shift_y0.0
scale_t1.0
shift_t0.0

Video models are trained at one resolution, and they fall apart the moment you leave it. Wan 2.2, in particular, starts visibly degrading above about a megapixel - textures like hair and fabric grid into mush - and everyone hits the same wall: they want bigger output than the model was ever shown. ScaleROPE is the core node that gets you past that wall, by lying to the model about where its tokens are.

The idea is simple and the implementation is direct. DiT video models know position through a rotary positional embedding (ROPE), and that embedding is computed from the spatial dimensions of your latent. ScaleROPE patches the model so the ROPE is computed on scaled coordinates: each axis - x (width), y (height), and t (time/frames) - gets its own scale and shift applied before the position embedding is built. Squeeze the coordinates with a scale under 1 and the model behaves as if your big canvas were the native size it was trained on; shift nudges where the coordinate window starts, which is how you keep a reference video or context clip aligned with the current one. In the source, the Wan model reads these options directly when it builds its ROPE: lengths get (len - 1) * scale + 1, starts get start + shift.

The inputs that matter

Six float inputs, and the honest answer is you use two of them:

  • scale_x / scale_y - your resolution fix. The community rule of thumb, from the people who actually cracked Wan 2.2 at 2MP: roughly 1 / sqrt(target_pixels / native_pixels), which lands around 0.7 / 0.7 for a 2-megapixel render. It's a starting point, not a law.
  • scale_t - the same trick for frame count, letting you run clips longer than the model was designed for.
  • shift_x / shift_y / shift_t - mostly for reference/pose workflows that need the context video's position window aligned to the generation. Defaults (1.0 scale, 0 shift) are a no-op.

One MODEL out, and the community's placement advice is specific: put it between your LoRA stack and the model-sampling node. Order matters less than making sure it's actually in the path before the sampler.

Where it came from and who it's for

ScaleROPE landed in October 2025, flagged experimental, and its own commit noted it "currently only works on WAN models" - Z-Image support followed shortly after, so check what your model actually reads. The thread that put it on the map was a single "Guys use scalerope" post that was genuinely right: one line in, and Wan 2.2 suddenly renders at resolutions it visibly can't handle natively. If you're running Wan 2.2 above ~1MP and haven't tried it, this is likely the single highest-value node you're missing. Just remember the values are resolution-dependent - switch resolutions and you re-derive the scale.

Categorymodel/patch

Inputs (7)

NameTypeDefaultDescription
modelMODEL
scale_xFLOAT1.00–100
shift_xFLOAT0.0-256–256
scale_yFLOAT1.00–100
shift_yFLOAT0.0-256–256
scale_tFLOAT1.00–100
shift_tFLOAT0.0-256–256

Outputs (1)

NameTypeDescription
MODELMODEL