🐳 WanVideo视频集成采样器——Github:@luguoli
The Integrated KSampler
- model_high_noise
- model_low_noise
- clip
- vae
- start_image
- end_image
- clip_vision
- latent
- 生成图像序列FrameImages
- 最后一帧LastFrameImage
- (可选)Latent
The name is doing a lot of work. A stock Wan 2.2 graph is two samplers by design - a high-noise expert that handles motion and composition, then a low-noise expert that refines detail - plus a CLIP text encoder, a VAE encode for your reference frame, a latent, a decode, and a save node holding it together with a small forest of wires. This node from @luguoli (same author as ComfyUI-Hive) collapses most of that into one box: hook up the model pair, CLIP, and VAE, type a prompt into the built-in text box, and frames come out the other side. Its own README calls it the "moms no longer have to worry about messy connections" node, and honestly that's the pitch.
Why you'd reach for it
Wan 2.2's two-pass architecture is why the community's speed-LoRA advice works - slap the fast LoRA on the low-noise pass only, keep high noise untouched, and you keep motion quality while cutting the slow part. Assembling that graph by hand is where beginners burn an afternoon, and this is the "I don't want to hand-wire it" answer. It also pulls in the chores people usually bolt on separately - prompt encoding, frame sizing, VRAM cleanup, batch generation, even a completion chime.
How it works
The sampling core is the standard dual-pass: the high-noise model denoises steps 0 through steps_high_noise, then the low-noise model picks up the latent and finishes the rest, with noise disabled and full denoise forced (that's straight from the pack's common_ksampler). The switch point is exactly the step split you type in. Around that core it clones both models and patches them: it flips on torch FP16 accumulation (needs PyTorch 2.7+), overrides attention with SageAttention when asked, applies an SD3-style sampling shift, and - for image-to-video - VAE-encodes your start/end frames and feeds them in as concat-latent conditioning, the same trick the official Wan I2V recipe uses. The motion_amplitude boost comes from PainterFLF2V and only fires when you've given it both a start and an end frame.
The inputs that matter
model_high_noise, model_low_noise, clip, and vae are required, and they come from the normal Wan loaders - ComfyUI loads Wan 2.1/2.2 natively, no wrapper needed. Everything else you mostly leave alone until you need it:
- length / width / height - 81 frames is the default and roughly the native context window (about 5 seconds). Width and height auto-round to multiples of 8, and the 720×1280 default is portrait - change it if that's not your intent.
- steps_high_noise / steps_low_noise - defaults are 4 and 4. Full-quality Wan 2.2 wants ~20–30 steps total without a speed LoRA; with CausVid or lightx2v you're back down to 3–4 per pass.
- cfg_high_noise / cfg_low_noise - default 1.0. If you're running a speed-distilled LoRA, keep it at 1. If you're doing full-quality no-LoRA runs, the community found 3.5+ on the high-noise stage gets noticeably better prompt adherence.
- start_image / end_image - wire a start image to switch from text-to-video to image-to-video.
end_imagerequires astart_imageor the node throws. - Worth knowing:
sage_attention(default "auto"),sd3_shift(default 5), the two memory-cleanup toggles,batch_size(1–10), and the seed.
Outputs: a full frame sequence (FrameImages, IMAGE - wire it to a save/preview node), a LastFrameImage (IMAGE - handy for chaining a follow-up clip off its ending), and an optional Latent.
Install
ComfyUI Manager → search "ComfyUI-Wan-Video-Integrated-KSampler" → Install. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/luguoli/ComfyUI-Wan-Video-Integrated-KSampler.git
pip install -r requirements.txt
Then restart ComfyUI. No models ship with the pack - you bring the Wan pair yourself. The base requirements are light (torch, transformers, einops, tqdm); the heavy stuff is optional. SageAttention needs pip install sageattention (Windows needs the community Triton builds), the fp16-accumulation toggle needs PyTorch 2.7+, and the completion sound is Windows-only.
Common issues
- VRAM is the wall. Wan 14B wants 12–16 GB minimum and 24 GB for comfortable 720p; an 81-frame clip is 15–40 minutes on a 4090 without a speed LoRA. The levers are all in this node's panels: fp8/GGUF checkpoints, SageAttention, and
enable_clean_gpu_memorybetween runs. - SageAttention silently failing. If you see "sage attention failed" in the console, the package isn't installed - the node disables it and carries on. Set it to
disabledand install sageattention before turning it back on. - Block swap is gone. The update log says it was removed because newer ComfyUI versions block it. If a saved workflow references it, that's why it vanished.
- The negative prompt ships pre-filled with Chinese text. Clear it if you don't want it.
It's a convenience node, not a magic one - the native 81-frame window and the VRAM appetite are still yours to manage. But for churning out 2.2 clips without rebuilding the graph every time, it does exactly what it says.
Inputs (28)
| Name | Type | Default | Description |
|---|---|---|---|
| model_high_noise | MODEL | 🔥 高噪模型 - 用于高噪阶段(第一阶段)的扩散模型 | |
| model_low_noise | MODEL | ❄️ 低噪模型 - 用于低噪阶段(第二阶段)的扩散模型 | |
| clip | CLIP | 🟡 CLIP - CLIP模型,用于文本编码和条件生成 | |
| vae | VAE | 🎨 VAE - VAE模型,用于编码/解码图像到潜空间 | |
| positive_prompt | STRING | ✅ 正向提示词 - 描述期望视频内容的文本提示 | |
| negative_prompt | STRING | 色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走 | ❌ 负向提示词 - 描述要避免的视频元素的文本提示 |
| batch_size | INT | 11–10 | 📦 批次数量 - 并行生成视频的数量 |
| length | INT | 8117–16384 | 📽️ 帧长度 - 生成视频的帧数 |
| width | INT | 7208–16384 | 📐 宽度 - 视频宽度像素(将自动调整为8的倍数) |
| height | INT | 12808–16384 | 📏 高度 - 视频高度像素(将自动调整为8的倍数) |
| steps_high_noise | INT | 40–10000 | 📊 高噪步数 - 高噪阶段的采样步数(第一阶段) |
| cfg_high_noise | FLOAT | 1.00–100 | 🎛️ 高噪CFG - 用于高噪阶段平衡随机性和提示词服从性。提高该值会使结果更加符合提示词,但过高会导致质量下降。 |
| steps_low_noise | INT | 40–10000 | 📊 低噪步数 - 低噪阶段的采样步数(第二阶段) |
| cfg_low_noise | FLOAT | 1.00–100 | 🎛️ 低噪CFG - 用于低噪阶段平衡随机性和提示词服从性。提高该值会使结果更加符合提示词,但过高会导致质量下降。 |
| noise_seed | INT | 00–18446744073709550000 | 🎲 噪波种子 - 噪波生成的随机种子,相同种子产生相同结果 |
| sampler_name | COMBO | 🌀 采样器 - 采样算法,会影响结果质量、生成速度、风格样式。 | |
| scheduler | COMBO | 📈 调度器 - 控制逐渐移除噪波的方法。 | |
| start_imageopt | IMAGE | 🖼️ 首帧图像(可选) - 不输入默认为文生视频 | |
| end_imageopt | IMAGE | 🖼️ 尾帧图像(可选) - 必须同时输入首帧 | |
| clip_visionopt | CLIP_VISION | 👁️ CLIP Vision(可选) - CLIP Vision模型,用于编码参考图像进行条件生成 | |
| latentopt | LATENT | 🟣 Latent(可空) - 如需使用ControlNet等可自行传入,内置图像处理将失效,例如首尾帧 | |
| torch_enable_fp16_accumulationopt | BOOLEAN | true | ⚡ Torch FP16累加 - 启用torch.backend.cuda.matmul.allow_fp16_accumulation以获得更好的VRAM效率(需要pytorch 2.7.0+) |
| sage_attentionopt | COMBO | auto | 🧠 Sage注意力 - 全局修补comfy注意力以使用sageattn,大幅提升速度和VRAM使用效率 |
| sd3_shiftopt | FLOAT | 5.000–100 | ⚙️ 采样算法SD3移位 - SD3采样算法移位参数,用于控制生成行为 |
| enable_clean_gpu_memoryopt | BOOLEAN | false | 🗑️ 清理显存占用 - 在采样/解码前后清理显存占用,以释放资源给其他应用 |
| enable_clean_cpu_memory_after_finishopt | BOOLEAN | false | 🗑️ 完成后清理内存 - 生成完成后清理CPU内存 |
| enable_sound_notificationopt | BOOLEAN | false | 🔊 完成后播放声音 - 解码完成后播放通知声音以提醒用户 |
| motion_amplitudeopt | FLOAT | 1.001–2 | 🏃 运动幅度增强 - 只作用于高噪阶段,只在首尾帧生成时且大于1.0时生效,1.0为完全不增强,最大2.0 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| 生成图像序列FrameImages | IMAGE | — |
| 最后一帧LastFrameImage | IMAGE | — |
| (可选)Latent | LATENT | — |