HappyWan
Pillar 01 · Node Graphs & Local Pipelines
11 min read
Verified 2026-12-02

ComfyUI Workflows for Wan & HappyWan: Native Nodes, JSON Graphs & OOM Fixes

An engineering handbook for running Apache-2.0 Wan 2.1 and Wan 2.2 MoE pipelines inside ComfyUI—covering native core nodes versus Kijai's WanVideoWrapper, T2V/I2V/First-Last Frame/LoRA graph architecture, SageAttention and TeaCache speedups, copyable starter JSON, and hybrid handoffs to live cloud Wan 3.0 and upcoming HappyWan 1.0.

Verified Live Assets Today

Verified live today: Apache-2.0 Wan 2.1 (1.3B / 14B) and Wan 2.2 (MoE A14B High/Low Noise + TI2V-5B) execute natively in ComfyUI core and via Kijai's ComfyUI-WanVideoWrapper.

Tracked Pre-Launch & Cloud Boundary

Tracked upcoming: HappyWan 1.0 (expected December 2026) has not released local ComfyUI checkpoints. Closed commercial engines Wan 3.0, Wan 3.0 Pro 4K, and HappyHorse 1.1 run in cloud Studio/API or via custom ComfyUI HTTP API bridge nodes.

ComfyUI Workflows for Wan & HappyWan: Native Nodes, JSON Graphs & OOM Fixes
Ecosystem Pillar 01 · Verified Live (Wan 2.1/2.2) + Cloud HybridVerified 2026-12-02

Engineering Summary · Key Takeaways

4 Verified Rules
  1. 01Use native ComfyUI core nodes (UNETLoader, WanImageToVideo, WanFirstLastFrameToVideo, KSamplerAdvanced) for long-term stability and zero Python dependency drift; switch to Kijai's `ComfyUI-WanVideoWrapper` when you need granular WanVideoBlockSwap, experimental TeaCache/MagCache thresholds, or early VACE/Phantom research features.
  2. 02Wan 2.2 A14B is a two-expert Mixture-of-Experts (MoE) architecture: you must hand off denoising mid-schedule from the High-Noise expert (global motion and camera framing) to the Low-Noise expert (fine texture and face consistency) using two chained KSamplerAdvanced nodes.
  3. 03Always pair ModelSamplingSD3 (shift: 5.0 for 480p or speed-LoRA graphs, 8.0 for full-step 720p) with tiled VAE decoding (VAEDecodeTiled) to prevent out-of-memory crashes during the final decode stage.
  4. 04Local open-weight ComfyUI graphs top out around 5–8 seconds of silent 480p–720p video with 1–4 reference anchors. For 15–30s continuous narratives, 20-to-50 reference World Bibles, native 4K mastering, or 7-language lip-sync, build a hybrid graph that exports keyframes locally and renders hero takes via live Wan 3.0 / HappyHorse 1.1 cloud endpoints.

Section 01

Verified Ecosystem Boundary: Local ComfyUI Weights vs. Cloud Flagship Engines

Before building a production node graph, technical directors need an honest boundary map between what executes locally inside ComfyUI today and what remains cloud-hosted. Alibaba's open-weight releases—Wan 2.1 (1.3B and 14B) and Wan 2.2 (27B total / 14B active MoE A14B for T2V/I2V, plus the compact 5B dense TI2V-5B checkpoint)—are live, verified Apache-2.0 assets with first-class ComfyUI support. Every single local workflow graph circulating across Reddit, GitHub, and Civitai runs on those open checkpoints.

By contrast, Wan 3.0 (up to 30 seconds, 20 multimodal references, native synchronized audio), Wan 3.0 Pro 4K, and HappyHorse 1.1 (7-language single-stream audiovisual lip-sync) are closed commercial cloud engines. Similarly, HappyWan 1.0—Alibaba's unified successor targeting up to 45 seconds and 50 multimodal World Bible references—remains a tracked pre-launch release expected in December 2026 with no official local checkpoints published as of December 2, 2026.

Recognizing this split unlocks a superior hybrid workflow instead of a dead end. Studios use local ComfyUI graphs for rapid image keyframe design, custom LoRA style exploration, and depth/pose control on Wan 2.2, then dispatch their locked start/end frames and reference sheets to live cloud engines via the HappyWan Video Studio or REST API when a shot demands 20–30 seconds of uninterrupted continuity, spoken dialogue, or commercial 4K delivery.

Section 02

Native ComfyUI Core Nodes vs. Kijai's ComfyUI-WanVideoWrapper

Every ComfyUI Wan builder hits the same architectural fork on day one: build on ComfyUI's built-in core Wan nodes or install Kijai's `ComfyUI-WanVideoWrapper` custom node pack. Both execute the exact same official Hugging Face .safetensors weights, yet they optimize for very different operational priorities.

ComfyUI's native stack treats Wan 2.1 and Wan 2.2 as standard diffusion models routed through UNETLoader (or UnetLoaderGGUF via ComfyUI-GGUF), CLIPLoader set to type: wan, VAELoader, ModelSamplingSD3, and standard KSamplerAdvanced. Because ComfyUI's core memory manager orchestrates VRAM automatically, native graphs almost never break after a git pull, share identical LoraLoaderModelOnly semantics with Flux and SDXL graphs, and integrate seamlessly with ControlNet, IP-Adapter, and upstream ComfyUI templates.

Kijai's ComfyUI-WanVideoWrapper implements a dedicated Wan inference runtime (WanVideoModelLoader, WanVideoTextEncode, WanVideoSampler, WanVideoBlockSwap, WanVideoTeaCache). Its chief advantage is surgical memory and speed control: you can specify exact transformer block counts to swap between GPU and host RAM (blocks_to_swap: 20), wire SageAttention 2 backends directly per node, toggle experimental FlowEdit / Uni3C / Phantom multi-reference extensions weeks before core adoption, and inspect per-step VRAM telemetry in the terminal.

Native ComfyUI Core vs. Kijai WanVideoWrapper Architectural Comparison

DimensionComfyUI Native Core NodesKijai ComfyUI-WanVideoWrapperRecommended Use
Maintenance & StabilityZero external node breakage across ComfyUI updatesFast-moving custom nodes; pin commit hashes in studio rigsNative for team pipelines; Wrapper for R&D
VRAM OffloadingAutomatic ComfyUI async offload + --lowvram flagsExplicit WanVideoBlockSwap (exact 0–40 block granularity)Wrapper wins on tight 12GB–16GB cards
Attention AccelerationGlobal launch flags (--use-sage-attention, PyTorch SDPA)Per-node selection (sdpa, sageattn, flash_attn_2)Tie on RTX 4090/5090 once wheels installed
Wan 2.2 MoE SplitChained KSamplerAdvanced (end_at_step -> start_at_step)Dedicated dual-model high/low noise sampler inputsNative is cleaner for standard T2V/I2V
Experimental ConditioningCore WanImageToVideo, WanFirstLastFrameToVideo, VACEEarly access to Phantom, Uni3C camera, ATI trajectories, TeaCacheWrapper for bleeding-edge motion control

Section 03

Five Production Graph Patterns: T2V, I2V, Reference, First-Last Frame & LoRA Stack

Video diffusion models fail most often when operators reuse a single Text-to-Video graph for every shot type. Matching the exact conditioning node to your shot specification cuts wasted renders by half and keeps camera geometry stable across cuts.

For Text-to-Video (T2V) on Wan 2.2 A14B, route EmptyHunyuanLatentVideo (or EmptyWanLatentVideo) at 832×480 or 1280×720 with frame counts strictly satisfying 4k + 1 (49, 65, 81, 97, or 121 frames). Non-conforming frame counts silently truncate or introduce final-frame flicker because the 3D causal video VAE compresses temporal stride by 4x plus the initial anchor frame.

For Image-to-Video (I2V) and First-Last Frame (FLF) locks, native ComfyUI provides WanImageToVideo and WanFirstLastFrameToVideo. Notice a major architectural improvement between Wan 2.1 and Wan 2.2: Wan 2.1 I2V required a separate clip_vision_h.safetensors encoder alongside the VAE latent image, whereas Wan 2.2 I2V-A14B drops the external CLIP Vision dependency completely and conditions directly on VAE-encoded image latents—simplifying graphs and saving ~1.8GB of memory.

For Multi-Reference Conditioning, local open-weight graphs rely on Wan 2.1 VACE or Phantom community adapters, which realistically hold 1 to 4 subjects/props before attention dilution degrades facial likeness. When your production script calls for a full ensemble cast, costume turnaround sheets, and location anchors, migrate the asset pack to live Wan 3.0 (up to 20 multimodal references today) or plan your slot taxonomy for HappyWan 1.0 (targeting up to 50 multimodal references) using the HappyWan World Bible Planner.

ComfyUI Wan Graph Mode Selection Matrix

Workflow ModePrimary ComfyUI NodeKey ParametersLocal Ceiling vs. Cloud Upgrade
Text-to-Video (T2V)EmptyWanLatentVideo + Dual KSamplerAdvancedlength: 81 (5s @ 16fps), shift: 5.0–8.0, cfg: 3.55–8s silent locally vs. 30s synced audio on Wan 3.0
Image-to-Video (I2V)WanImageToVideo (Wan 2.2 drops CLIP Vision)Match input aspect ratio to 16px multiples (832×480)Great for 5s animatics; Wan 3.0 Pro adds native 4K
First-Last Frame (FLF)WanFirstLastFrameToVideoLock start_image & end_image with identical color grade5s morph transitions locally; 30s bridge takes in cloud
Reference / Subject LockWan 2.1 VACE / Phantom Wrapper nodes1–4 clean cutout references; strict background masking1–4 refs locally vs. 20 refs live (Wan 3.0) / 50 target (HappyWan)
Multi-LoRA StackChained LoraLoaderModelOnly per MoE expertHigh-Noise: camera + speed; Low-Noise: face/lighting + speedUnmatched custom LoRA freedom locally; zero-training refs in cloud

Section 04

Speed Optimization Stack: SageAttention 2, TeaCache & 4-Step Distillation

Unoptimized BF16 Wan 2.2 14B sampling at 30 steps takes 10 to 18 minutes per 5-second 720p clip even on an RTX 4090. Production ComfyUI rigs stack three orthogonal accelerators—kernel-level attention optimization, inter-step residual caching, and step-distillation LoRAs—to compress generation down to 90–180 seconds.

SageAttention 2 quantizes query/key/value attention matmuls to INT8/FP8 inside fused CUDA/Triton kernels, delivering a clean 1.6x to 2.2x wall-clock speedup with virtually zero perceptual degradation on Ada (RTX 40-series) and Blackwell (RTX 50-series) GPUs. Launch ComfyUI with --use-sage-attention after installing the wheel matching your exact Python, PyTorch, and CUDA minor versions.

TeaCache (Timestep Embedding Aware Cache) exploits the fact that consecutive denoising steps often produce near-identical transformer residuals. Setting rel_l1_thresh between 0.15 and 0.22 skips 35%–45% of redundant transformer passes without breaking fluid motion. Pushing rel_l1_thresh above 0.30 saves another 20 seconds but introduces waxy skin and smeared hand motion during fast camera whips—keep start_percent at 0.15 so the first few high-noise layout steps always compute in full.

For rapid pre-visualization, pairing Wan 2.2 with matched LightX2V or CausVid 4-to-8 step distillation LoRAs slashes step counts from 20–30 down to 6–8 total steps (cfg: 1.0, shift: 5.0). Never leave CFG at 5.0 when a distillation LoRA is active: CFG > 1.5 doubles compute latency AND burns highlights into harsh posterized edges.

  • 01Baseline (PyTorch SDPA, 24 steps, CFG 3.5): 100% fidelity reference, ~5.5–7.5 min per 5s 720p clip on RTX 4090 FP8.
  • 02Balanced Studio (+ SageAttention 2 + TeaCache 0.18): 2.4x faster (~2.5–3.2 min), preserves crisp hair, foliage, and fast parallax.
  • 03Turbo Draft (+ LightX2V High/Low LoRA, 6 steps, CFG 1.0): 4x–5x faster (~55–95 sec on RTX 4090), ideal for camera blocking before final cloud mastering.
  • 04VAE Safety Rule: Always enable VAEDecodeTiled (tile_size: 256, overlap: 64, temporal_size: 64) on 12GB–24GB GPUs; the 3D temporal VAE spike is the #1 cause of late-stage OOM failures after 99% completion.

Section 05

Copyable Starter ComfyUI Graph JSON (Wan 2.2 MoE + Tiled VAE + LoRA Hook)

The verified ComfyUI API-format skeleton below wires both Wan 2.2 A14B FP8 experts through ModelSamplingSD3, injects an optional LoraLoaderModelOnly slot on each expert stage, hands off residual noise at step 4 of an 8-step accelerated schedule, and decodes through VAEDecodeTiled so your GPU does not crash on the final frame buffer. Load it via ComfyUI's API runner or recreate the numbered chain directly in the visual canvas.

wan22_moe_lora_tiled_starter.jsonjson
{
  "1": {
    "class_type": "CLIPLoader",
    "inputs": {
      "clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
      "type": "wan",
      "device": "cpu"
    }
  },
  "2": {
    "class_type": "VAELoader",
    "inputs": { "vae_name": "wan_2.1_vae.safetensors" }
  },
  "3": {
    "class_type": "UNETLoader",
    "inputs": {
      "unet_name": "wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
      "weight_dtype": "default"
    }
  },
  "4": {
    "class_type": "UNETLoader",
    "inputs": {
      "unet_name": "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
      "weight_dtype": "default"
    }
  },
  "5": {
    "class_type": "LoraLoaderModelOnly",
    "inputs": {
      "model": ["3", 0],
      "lora_name": "wan2.2_t2v_lightx2v_4steps_lora_v1.1_high_noise.safetensors",
      "strength_model": 1.0
    }
  },
  "6": {
    "class_type": "LoraLoaderModelOnly",
    "inputs": {
      "model": ["4", 0],
      "lora_name": "wan2.2_t2v_lightx2v_4steps_lora_v1.1_low_noise.safetensors",
      "strength_model": 1.0
    }
  },
  "7": {
    "class_type": "ModelSamplingSD3",
    "inputs": { "model": ["5", 0], "shift": 5.0 }
  },
  "8": {
    "class_type": "ModelSamplingSD3",
    "inputs": { "model": ["6", 0], "shift": 5.0 }
  },
  "9": {
    "class_type": "CLIPTextEncode",
    "inputs": {
      "clip": ["1", 0],
      "text": "Slow 35mm dolly-in through a rain-slick Tokyo alley at midnight, warm tungsten lantern reflections on wet asphalt, lone courier in a dark trench coat turning toward camera, crisp shallow depth of field, natural handheld micro-sway"
    }
  },
  "10": {
    "class_type": "CLIPTextEncode",
    "inputs": {
      "clip": ["1", 0],
      "text": "static frozen frame, morphed hands, oversaturated neon, warped architecture, flicker, text watermark, low-res artifacts"
    }
  },
  "11": {
    "class_type": "EmptyHunyuanLatentVideo",
    "inputs": { "width": 832, "height": 480, "length": 81, "batch_size": 1 }
  },
  "12": {
    "class_type": "KSamplerAdvanced",
    "inputs": {
      "model": ["7", 0],
      "add_noise": "enable",
      "noise_seed": 918273,
      "steps": 8,
      "cfg": 1.0,
      "sampler_name": "euler",
      "scheduler": "simple",
      "positive": ["9", 0],
      "negative": ["10", 0],
      "latent_image": ["11", 0],
      "start_at_step": 0,
      "end_at_step": 4,
      "return_with_leftover_noise": "enable"
    }
  },
  "13": {
    "class_type": "KSamplerAdvanced",
    "inputs": {
      "model": ["8", 0],
      "add_noise": "disable",
      "noise_seed": 0,
      "steps": 8,
      "cfg": 1.0,
      "sampler_name": "euler",
      "scheduler": "simple",
      "positive": ["9", 0],
      "negative": ["10", 0],
      "latent_image": ["12", 0],
      "start_at_step": 4,
      "end_at_step": 10000,
      "return_with_leftover_noise": "disable"
    }
  },
  "14": {
    "class_type": "VAEDecodeTiled",
    "inputs": {
      "samples": ["13", 0],
      "vae": ["2", 0],
      "tile_size": 256,
      "overlap": 64,
      "temporal_size": 64,
      "temporal_overlap": 8
    }
  }
}

Tip: If running without speed LoRAs, remove nodes 5–6, raise `steps` to 20–24, split High-to-Low at step 10–12, and set `cfg` to `3.5–4.5`.

Section 06

Bridging ComfyUI to Live Cloud Wan 3.0 & Future HappyWan 1.0 Mastering

The most efficient creative studios treat local ComfyUI and cloud video APIs as complementary stages of one pipeline rather than opposing camps. Local ComfyUI excels at generating exact character turnaround stills, controlled lighting keyframes, and rapid 5-second style experiments where you want custom Civitai LoRAs and zero per-click cost.

The moment a sequence needs 15 to 30 seconds of uninterrupted storytelling, synchronized ambient audio and foley, 7-language spoken lip-sync (HappyHorse 1.1), or native 2K/4K commercial mastering (Wan 3.0 Pro), local open weights hit an architectural wall. Instead of stitching six silent 5-second local clips with visible seam jumps and third-party audio dubs, export your locked ComfyUI keyframes and submit them directly to HappyWan Video Studio or POST /api/jobs.

Because HappyWan Video uses one forward-compatible REST schema across wan-3.0, wan-3.0-pro, happyhorse-1.1, and upcoming happywan-1.0, teams that integrate a lightweight API call at the end of their ComfyUI keyframe graph will gain 45-second / 50-reference HappyWan 1.0 capability on Day 1 simply by swapping one model string—backed by 100% automatic credit refunds whenever a job fails or trips moderation.

Failure Diagnostics & Field Q&A

Troubleshooting Common Local & Hybrid Issues

OOM AT 99%Why does ComfyUI throw CUDA Out of Memory right after sampling finishes at 100%?
The 3D causal Wan VAE decodes spatiotemporal video tensors that momentarily spike VRAM far above the diffusion pass. Replace standard VAEDecode with VAEDecodeTiled (tile_size: 256, overlap: 64, temporal_size: 64) and keep CLIPLoader pinned to device: cpu so UMT5-XXL never shares GPU memory with the VAE.
MOE SEAM FLASHWhy does brightness or facial geometry suddenly shift halfway through Wan 2.2 sampling?
Check three settings in your chained KSamplerAdvanced nodes: the High-Noise sampler must set return_with_leftover_noise: enable, the Low-Noise sampler must set add_noise: disable, and both samplers must share the exact same steps, scheduler, and ModelSamplingSD3 shift value.
SAGEATTENTION BUILDSageAttention fails to import or crashes with Triton kernel errors on Windows/Linux—what is the fastest fix?
SageAttention wheels are tightly coupled to exact Python, PyTorch, and CUDA versions (for example, cu128 + torch 2.7 on RTX 5090). Verify python -c "import torch; print(torch.__version__, torch.version.cuda)" before installing a matching prebuilt wheel, or fall back cleanly to PyTorch native SDPA (--use-pytorch-cross-attention) while debugging.
TEACACHE BLURWhy do fast camera pans turn muddy or smear fingers when TeaCache is turned on?
Your rel_l1_thresh is too aggressive for high-velocity scenes. Lower rel_l1_thresh from 0.25–0.35 down to 0.14–0.18 and set start_percent: 0.15 so early trajectory-forming denoising steps always compute without skipping.
NO AUDIO TRACKCan local ComfyUI Wan 2.2 workflows output native synchronized speech and foley like HappyHorse 1.1 or Wan 3.0?
No. Open-weight Wan 2.1 and Wan 2.2 models are silent visual-only generators—adding sound locally requires separate post-hoc MMAudio or external TTS dubbing that cannot lock facial micro-expressions to phonemes. For single-pass native audio and 7-language lip-sync, render on live Wan 3.0 or HappyHorse 1.1 in HappyWan Studio.

Skip Local Hardware Bottlenecks

Run live Wan 3.0, Wan 3.0 Pro 4K & HappyHorse 1.1 in Studio today.

Render up to 30-second continuous scenes with synchronized native audio (5 cr/s at 480p, 10 cr/s at 720p) or 7-language lip-sync without touching a single CUDA wheel—backed by 100% automatic credit refunds on failed renders.

Continue Exploring the Open-Source Column

Pillar 02

Hugging Face Weights

Official Wan-AI repos vs. HappyWan open-weights release tracker, BF16/FP8/GGUF precision matrix, UMT5-XXL + VAE directory tree, and huggingface-cli scripts.

Read Pillar
Pillar 03

Civitai LoRAs

Camera motion, character lock & lighting/anime LoRA taxonomy, High/Low Noise stacking at 0.6–0.85 strength, mature/cloud policy contrast, and .safetensors auditing.

Read Pillar
Pillar 04

VRAM & Local Setup

12GB / 16GB / 24GB / 32GB / 80GB reality check, GGUF block-swap & CPU offload speeds, RunPod hourly cost vs. instant HappyWan cloud credits.

Read Pillar

Related Technical Monographs & Tools

ComfyUI Workflows for Wan & HappyWan: Nodes, JSON & OOM