ComfyUI Extension: KSampler for Wan 2.2 MoE for ComfyUI
These nodes are made to support 'Mixture of Expert' Flow models with the architecture of Wan2.2 A14B (With a high noise expert and low noise expert). Instead of guessing the denoising step at which to swap from tyhe high noise model to the low noise model, this node automatically chanage to the low noise model when we reach the diffusion timestep at which the signal to noise ratio is supposed to be 1:1.
Custom Nodes (67)
- AIO Aux Preprocessor
- AnimalPose Estimator (AP10K)
- Anime Face Segmentor
- Anime Lineart
- AnyLine Lineart
- BAE Normal Map
- Binary Lines
- Canny Edge
- Color Pallete
- ControlNetAuxSimpleAddText
- Preprocessor Selector
- DensePose Estimator
- Depth Anything
- Depth Anything V2 - Relative
- Diffusion Edge (batch size ↑ => speed ↑, VRAM ↑)
- DSINE Normal Map
- DWPose Estimator
- Execute All ControlNet Preprocessors
- Colorize Facial Parts from PoseKPS
- Fake Scribble Lines (aka scribble_hed)
- HED Soft-Edge Lines
- Enchance And Resize Hint Images
- Generation Resolution From Image
- Generation Resolution From Latent
- Image Intensity
- Image Luminance
- Inpaint Preprocessor
- LeReS Depth Map (enable boost for leres++)
- Realistic Lineart
- Standard Lineart
- Manga Lineart (aka lineart_anime_denoise)
- Mask Optical Flow (DragNUWA)
- MediaPipe Face Mesh
- MeshGraphormer Hand Refiner
- MeshGraphormer Hand Refiner With External Detector
- Metric3D Depth Map
- Metric3D Normal Map
- MiDaS Depth Map
- MiDaS Normal Map
- M-LSD Lines
- OneFormer ADE20K Segmentor
- OneFormer COCO Segmentor
- OpenPose Pose
- PiDiNet Soft-Edge Lines
- Pixel Perfect Resolution
- PyraCanny
- Render Pose JSON (Animal)
- Render Pose JSON (Human)
- SAM Segmentor
- Save Pose Keypoints
- Scribble PiDiNet Lines
- Scribble Lines
- Scribble XDoG Lines
- Semantic Segmentor (legacy, alias for UniFormer)
- Content Shuffle
- Split sigmas at timestep
- TEEDPreprocessor
- Tile
- TTPlanet Tile GuidedFilter
- TTPlanet Tile Simple
- UniFormer Segmentor
- Unimatch Optical Flow
- Upper Body Tracking From PoseKps (InstanceDiffusion)
- Wan MoE KSampler
- Wan MoE KSampler (Advanced)
- Zoe Depth Anything
- Zoe Depth Map
README
KSampler for Wan 2.2 MoE for ComfyUI
These nodes are made to support "Mixture of Expert" Flow models with the architecture of Wan2.2 A14B (With a high noise expert and low noise expert). Instead of guessing the denoising step at which to swap from tyhe high noise model to the low noise model, this node automatically chanage to the low noise model when we reach the diffusion timestep at which the signal to noise ratio is supposed to be 1:1.
Installation
To install this node, follow these steps:
- Clone this repository into your ComfyUI custom nodes directory.
- Restart ComfyUI to load the new node.
git clone https://github.com/stduhpf/ComfyUI--WanMoeKSampler.git /path/to/ComfyUI/custom_nodes/WanMoeKSampler
Usage
See workflows included in this repository for basic usage.
About the boundary
parameter:
This correspond to the diffusion timestep around which the model used is supposed to start using the low noise expert. For Wan 2.2 T2V, this value should be 0.875
, For Wan 2.2 I2V, the value should be 0.900
. Using other values might still work.
Note that diffusion timesteps is NOT the same thing as denoising steps at all. You could think of the diffusion timesetp roughly as how much noise is added in the image (during training). At timestep 0
, the image is clean, with no noise added. At a timestep of 1
, the image/video is pure noise. And for Wan2.2 a14B T2V model, around timestep 0.875
(0.9
for I2V), the video should be half noise, half useful data. The timestep is realated to the corresponding denoising step with a non-linear relationship that depends on the total number of steps, the sampling method used, and the noise scheduler (and sigma shift).
License
This project mostly contains code copy-pasted from ComfyUI, which is licenced under GPL3.0. Therefore it is also licenced under GPL 3.0. (see LICENCE file for more details)