Wan Video Sampler(SE)
The sampler behind raindrop313's Wan start/end-frame fork
- model
- text_embeds
- image_embeds
- samples
- feta_args
- context_options
- teacache_args
- flowedit_args
- slg_args
- samples
This is the highest-traffic node in the pack by a wide margin, and that tracks - it's the actual sampler, the thing that turns your model, your prompt, and your start/end image conditioning into a video latent. Every other node here (model loader, VAE loader, image encoder) exists to feed this one.
Worth knowing before you wire it up: this node only takes two of its three conditioning-shaped required inputs from this pack. model comes from WanVideoSEModelLoader and image_embeds comes from WanVideoSEImageClipEncode, both part of this fork - but text_embeds has to come from Kijai's mainline ComfyUI-WanVideoWrapper, specifically its text encoder node. This pack only forks the pieces that needed changing for start/end-frame support; text encoding wasn't one of them, so you need both packs installed side by side. That matches how the README itself frames this pack - "a modification of Kijai's nodes code," not a standalone replacement.
How it works
Standard flow-matching diffusion sampling, steered simultaneously by your text conditioning and the start/end image embeds from earlier in the graph - steps of denoising guided by CFG, run through your chosen scheduler, producing a latent the decode node turns into frames.
The inputs and outputs that matter
- steps (default 30) and cfg (default 6) - the usual diffusion knobs. Wan is a flow-matching model, so don't assume SDXL-era CFG intuition carries over directly.
- shift (default 5) - the flow-matching timestep shift, controlling how sampling effort splits between composition and fine detail. It's model-specific rather than a universal constant, and worth knowing: some schedulers apply their own internal shift and ignore this value entirely, so if changing shift seems to do nothing, check which scheduler you've picked before assuming it's broken.
- scheduler -
unipc(default),dpm++,dpm++_sde, oreuler. - force_offload (default on) - its own tooltip: "Moves the model to the offload device after sampling." Leave it on unless you're chaining multiple sampler calls back to back and want to skip the reload cost.
- riflex_freq_index - deserves its own callout. Its tooltip: "Frequency index for RIFLEX, disabled when 0, default 6. Allows for new frames to be generated after without looping." Wan's native context tops out around 81 frames; push past that without RIFLEX and clips tend to loop or degrade. Note the schema's actual default value is 0 (off), even though the tooltip's own text mentions 6 - if you're generating longer clips and getting loopy results, that's the field to reach for.
Optional inputs cover the advanced end: samples plus denoise_strength for video-to-video, feta_args, context_options, flowedit_args, and two worth naming specifically - teacache_args (trades some quality for real speed by skipping redundant computation across similar frames) and slg_args (skip-layer guidance, added to this fork shortly after its initial release per the changelog). Both plug in from matching nodes in Kijai's wrapper.
Output is samples, typed LATENT, straight into WanVideoSEDecode.
How to install it
ComfyUI Manager, search "ComfyUI-WanVideoStartEndFrames," install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/raindrop313/ComfyUI-WanVideoStartEndFrames
Remember this needs Kijai's ComfyUI-WanVideoWrapper installed too - for the text encoder feeding text_embeds, and because that's the pack the README actually points to for model download instructions.
Common issues & troubleshooting
Severe distortion with no obvious cause. The README says it plainly, and it's specific enough to repeat: generating without a real positive prompt can produce "severe video distortion." That's not an edge case, it's the stated expected failure mode - always wire a genuine text_embeds input into this sampler.
TeaCache errors right after installing. A real snag people have hit: grab the example workflow off the GitHub repo, let ComfyUI Manager auto-install the flagged missing nodes, and end up with a TeaCache node that doesn't match what the workflow expects - there are multiple "teacache" node packages out there, and Manager doesn't always resolve to the one a given workflow was actually built against. If the sampler errors on a TeaCache-related field after a fresh install, don't assume your workflow is broken; check that the TeaCache node you got matches, and if you can't tell, deleting the teacache_args connection entirely (accepting slower generation) is a reliable way to confirm that's the source.
Inputs (17)
| Name | Type | Default | Description |
|---|---|---|---|
| model | WANVIDEOMODEL | — | |
| text_embeds | WANVIDEOTEXTEMBEDS | — | |
| image_embeds | WANVIDIMAGE_EMBEDS | — | |
| steps | INT | 30 | — |
| cfg | FLOAT | 6.000–30 | — |
| shift | FLOAT | 5.000–1000 | — |
| seed | INT | 00–18446744073709550000 | — |
| force_offload | BOOLEAN | true | Moves the model to the offload device after sampling |
| scheduler | COMBO | unipc | 4 options: unipc, dpm++, dpm++_sde, euler |
| riflex_freq_index | INT | 00–1000 | Frequency index for RIFLEX, disabled when 0, default 6. Allows for new frames to be generated after without looping |
| samplesopt | LATENT | init Latents to use for video2video process | |
| denoise_strengthopt | FLOAT | 1.000–1 | — |
| feta_argsopt | FETAARGS | — | |
| context_optionsopt | WANVIDCONTEXT | — | |
| teacache_argsopt | TEACACHEARGS | — | |
| flowedit_argsopt | FLOWEDITARGS | — | |
| slg_argsopt | SLGARGS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| samples | LATENT | — |