Smart Mobius WAN Loop
The Wan loop node with three tricks in one, none of them magic
- model_high
- model_low
- positive
- negative
- vae
- start_image
- end_image
- clip_vision_start_image
- clip_vision_end_image
- model_high
- model_low
- positive
- negative
- latent
Seamless loops on Wan 2.2 are the itch this node scratches. Wan's base model has no loop mode - the two-pass high/low-noise architecture just wasn't built to wrap end to start - and for a long time "loop it" meant leaving ComfyUI for AnimateDiff or stitching frames by hand. The VACE Video Joiner added a Make Loop toggle in March 2026 for the post-processing route. Smart Mobius WAN Loop takes the opposite approach: it makes the denoiser itself think in circles, using the Mobius technique - a latent-shift trick from the video-looping community (github.com/YisuiTT/Mobius) that redistributes the temporal position bias so the last frame behaves like it's next to the first.
Important framing before anything else: this node doesn't sample. It takes your Wan 2.2 high-noise and low-noise models plus conditioning, and hands you back patched models, patched conditioning, and a latent - which you then feed into your normal two-pass KSampler chain. It's a loop-ifying prep node, not a one-click generator. That's also why it's genuinely interesting: three independent mechanisms, each togglable, so you can see what's actually helping.
The three mechanisms
1. Latent shift (Mobius). Each denoising step, the noisy latent is rolled along the time axis before the model sees it, then rolled back after. Because the model's temporal RoPE positions the frames, cycling which frame sits at which position distributes the position bias evenly instead of letting the end frames always be "the end." The shift_skip input controls the roll stride; leave it 0 and the node auto-picks a stride coprime with the latent frame count so the cycle covers every position.
2. Loop blend. A post-CFG callback that ramps the last K denoised frames toward the first K frames' predictions. Wan's known end-frame noise artifact gets corrected by replacing the tail with a blend of the head - blend_strength 0 = no correction, 1 = fully replace the end with the start's predictions. Default 0.5, and blend_frames sets how many end frames to touch.
3. Circular RoPE. Compresses the temporal RoPE positions so the last frame sits closer to the first in attention space - circular_rope_strength 0.5 compresses positions by half. The idea is the model attends across the loop boundary as if it were a normal adjacency.
On top of those, it builds the standard Wan FLF-style concat conditioning: a gray-filled reference sequence with your start_image/end_image planted at the head and tail, VAE-encoded into the conditioning, plus optional CLIP vision merging. The motion_amplitude input (1.0–2.0) applies an "inverse structural repulsion" boost from the author's PainterFLF2V work - 1.0 is official behavior, higher pushes motion.
The inputs that matter
The core six: model_high, model_low (your two Wan 2.2 models), positive, negative, vae, and the size triplet width (832), height (480), length (81). Then the loop knobs: enable_latent_shift, enable_loop_blend, enable_circular_rope (all on by default), each with its strength/detail input, plus start_image/end_image for I2V-style anchoring.
Outputs: model_high, model_low (patched), positive, negative (patched), and latent - all wired into your dual KSampler pass.
Where it shines, and where it doesn't
If you want a quick loop from footage you already have, the VACE Make Loop route is easier and you should start there. This node is for when you want the loop in the sampling itself - infinite-loop aesthetics, no post-processing seam, full control over start/end frames. It's also the most "know what you're doing" node in the pack: three mechanisms fighting the same artifact can over-correct if you max them all. Start with defaults, then disable one at a time to see which is doing the work.
Installing it
Part of SmartHelperNodes, one install:
cd ComfyUI/custom_nodes
git clone https://github.com/slvslvslv/ComfyUI-SmartHelperNodes
Restart ComfyUI, or ComfyUI Manager → "SmartHelperNodes". No pip dependencies. You'll still need the Wan 2.2 models themselves and your usual two-pass sampler chain - this node feeds into it.
Common issues
The length must be a 4n+1-compatible frame count for clean latent math (81, 121, 161...), and the loop only works if the start and end frames are actually close - the node can bias the denoiser toward looping, but it won't bridge a start image and an unrelated end image. roll_concat_conditioning is marked experimental in the schema for a reason; leave it off unless you understand the concat conditioning it rolls. And because it's prep, not sampling: if nothing loops, check your sampler chain, not just this node.
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| model_high | MODEL | — | |
| model_low | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| width | INT | 83216–8192 | — |
| height | INT | 48016–8192 | — |
| length | INT | 811–8192 | — |
| batch_size | INT | 11–4096 | — |
| start_imageopt | IMAGE | — | |
| end_imageopt | IMAGE | — | |
| clip_vision_start_imageopt | CLIP_VISION_OUTPUT | — | |
| clip_vision_end_imageopt | CLIP_VISION_OUTPUT | — | |
| motion_amplitudeopt | FLOAT | 1.001–2 | 1.0 = official FLF, 2.0 = max structural repulsion boost |
| enable_latent_shiftopt | BOOLEAN | true | Mobius-style circular latent rolling each denoising step |
| shift_skipopt | INT | 00–100 | Roll stride per step. 0 = auto (coprime with latent frame count) |
| enable_loop_blendopt | BOOLEAN | true | Blend end-frame predictions toward start-frame predictions after CFG |
| blend_framesopt | INT | 51–20 | Number of end frames to correct via boundary blending |
| blend_strengthopt | FLOAT | 0.500–1 | 0 = no correction, 1 = fully replace end with start predictions |
| enable_circular_ropeopt | BOOLEAN | true | Compress temporal RoPE so last frame is closer to first |
| roll_concat_conditioningopt | BOOLEAN | false | Experimental. Roll concat_mask/concat_latent_image together with the latent cycle. |
| circular_rope_strengthopt | FLOAT | 0.500–1 | 0 = no change, 1 = maximum temporal compression |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model_high | MODEL | — |
| model_low | MODEL | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |