Wan Sampler
The sampler that runs T2V, I2V and inpaint without you thinking about it
- model
- start_image
- end_image
- images
Wan Sampler (WanVideoSampler_F2) is the KSampler of this pack - the node that actually denoises the video and hands back your frames. But unlike a generic KSampler, it's Wan-aware in a way that saves you a lot of plumbing: feed it a start image and it runs image-to-video; give it a start and end image on the right model and it runs the Fun-InP inpaint workflow; leave both empty and it's plain text-to-video. One node, three modes, decided by what you plug in.
How it works
It reads its marching orders from the Wan Configure node's config (frames, resolution, steps, CFG, prompts) - so Configure has to be in the graph and wired through the patcher, or there's nothing to sample. Then it:
- encodes your prompts with the auto-loaded umt5 text encoder (for I2V it also runs the image through CLIP-Vision),
- builds an empty latent with the right temporal shape - frames = duration × 16 + 1, spatial dims divided by 8 - and, for I2V, encodes your start frame into a
concat_latent_imagethat gets tacked onto the conditioning, - samples with your chosen sampler/scheduler (defaults: uni_pc / sgm_uniform, with 44 samplers and 9 schedulers to pick from),
- optionally runs a
denoised_outputpass - an extra 5-step dpmpp_2m refine at 0.49 denoise, for when you want a cleaner finish at a real time cost, - and VAE-decodes, either in one shot or tiled (
vae_decode_type+vae_tile_size) for VRAM relief, with a live TAE preview whose resolution you control viapreview_resolution.
Model-mode detection is automatic and worth understanding: if the loaded model name contains i2v (or fun + inp), it treats start_image as an anchor; the Fun-InP inpaint models take both start_image and end_image and fill the video between your first and last frame. The Fun control models are a different story - their image-encoding function is literally pass # todo in the source, so don't expect the control variants to work yet.
The extend_video_count from Configure plugs in here too: when it's 2+, the sampler runs the clip, then re-seeds each subsequent segment from its own last frame, chaining them into one longer output.
The inputs that matter
- model - from the Wan Model Patcher.
- seed - the usual; lock it for reproducible runs.
- sampler / scheduler - uni_pc/sgm_uniform are fine defaults. The KB's Wan advice:
res_2sis the quality sampler at roughly double the time,euler+betais the fast option. Both are in the list. - start_image / end_image (optional) - from the Resize Image node. Wire
start_imageand you've built an I2V workflow; addend_imageon a Fun-InP model and you've built an inpaint-between-frames one.
Output is a single images tensor - feed it to the Wan Frame Enhancer for upscaling/interpolation, then into a VHS_VideoCombine node to save your clip (the pack's example workflows use VideoHelperSuite for that; the pack doesn't ship its own video output node).
Installing
flow2-wan-video via ComfyUI Manager (search flow2-wan-video) or git clone https://github.com/Flow-two/flow2-wan-video.git into custom_nodes, then pip install -r requirements.txt and restart. Models auto-download on the loader's first run.
Troubleshooting
- Resolution surprise: for I2V the sampler takes its width/height from the start image itself, not the Configure node. Resize your start frame to the resolution you actually want.
- 81 frames is the wall. At 16fps that's ~5 seconds. Going much past it produces warping and looping - that's Wan, not the node. Chain via
extend_video_countor move to an extension workflow. - The group=1 channel error:
Given groups=1, weight of size [5120, 36, 1, 2, 2]...is the community's signature error with this pack - flow2-wan-video's global patches have broken native Wan workflows for a lot of people. If you're running the pack's own pipeline and see it, reinstall clean; if another workflow breaks while the pack is installed, the pack is the prime suspect. - Text encoding takes a while on first run - the umt5 fp8 encoder is loading; it gets cached after.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| seed | INT | 12340–18446744073709550000 | — |
| sampler | COMBO | uni_pc | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| scheduler | COMBO | sgm_uniform | 9 options: simple, sgm_uniform, karras, exponential, ddim_uniform, beta, +3 |
| denoised_output | BOOLEAN | — | |
| vae_decode_type | COMBO | 2 options: default, tiled | |
| vae_tile_size | INT | 19264–4096 | — |
| preview_resolution | INT | 25664–1280 | — |
| unload_all_models | BOOLEAN | — | |
| start_imageopt | IMAGE | — | |
| end_imageopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |