Nodes/Kraken Tools/πŸ™ Kraken WAN Helper
ComfyUI Node

πŸ™ Kraken WAN Helper

Point WAN at your first frame and let it figure out the canvas

By krakenunboundΒ·Created 8 months agoΒ·Updated 8 months agoΒ· 2
πŸ™ Kraken WAN Helper
  • first_frame
  • last_frame
  • processed_first_frame
  • processed_last_frame
  • width
  • height
  • frames(length)
  • fps
  • resolution_text
β—„performance_tier720p Quality Tierβ–Ί
β—„max_preprocess_long_side1280β–Ί
β—„multiple_of16β–Ί
β—„duration_seconds4β–Ί
β—„fps16β–Ί
β—„add_bookend_frametrueβ–Ί

WAN video generation has a bunch of numbers you have to get right before a single frame renders: width, height, frame count, fps, and they all have to match what the model can actually do. 720p WAN wants ~1280x720 in the right aspect ratio; 480p wants 832x480. Get one number wrong and you get a washed-out, letterboxed, or flatly rejected generation. πŸ™ Kraken WAN Helper is the Kraken Tools node that computes all of it for you - from the frame you hand it.

It's the front half of the pack's WAN story. Give it a first frame (and optionally a last frame), tell it how long and how fast, and it returns preprocessed frames plus the width, height, total frame count, and fps as outputs you wire straight into your WAN generation node. It also auto-detects the aspect ratio of your first frame and snaps it to one WAN can actually run.

How it works

The flow: if you connect a first_frame (and/or last_frame) image, the node resizes it to fit within max_preprocess_long_side (default 1280) - that's the preprocessing that keeps your source from being bigger than the model expects. It measures the frame, maps it to the nearest common aspect ratio (16:9, 9:16, 1:1, 4:5, or 3:4), then looks up the right canvas for your tier:

  • 720p Quality Tier β†’ 1280x720, 720x1280, 960x960, 864x1080, 816x1088
  • 480p Speed Tier β†’ 832x480, 480x832, 624x624, 384x480, 368x496

Both tables get snapped down to multiple_of (default 16), which is the alignment WAN's VAE wants. No first frame connected? It defaults to a 9:16 canvas, which is WAN's most common video orientation - handy for pure text-to-video.

The other inputs are plain and self-explanatory:

  • duration_seconds - 1–10, the clip length.
  • fps - 16, 24, 30, 8, or 12. 16 at 480p is the classic speed/smoothness compromise.
  • add_bookend_frame - on by default. WAN 2.x pipelines add a trailing bookend frame, and the node pre-counts it, so frames(length) comes out as duration Γ— fps + 1. Turn it off if your pipeline doesn't add one and you're getting "wrong frame count" errors.

The frame math is the nice part: frames(length) = duration_seconds Γ— fps, plus the bookend, handed to you as an INT you never compute yourself.

Outputs

  • processed_first_frame / processed_last_frame (IMAGE) β†’ the resized, model-ready frames, straight into WAN's first/last-frame inputs. No separate resize node needed.
  • width / height (INT), frames(length) (INT), fps (FLOAT), resolution_text (STRING) β†’ the parameters, wired into the generation node's own width/height/frames/fps inputs. resolution_text ("1280 x 720") is for display/logging.

The whole point: one node replaces the pile of empty-latent + image-resize + arithmetic nodes you'd otherwise need to drive a WAN graph.

Install

Pack install as usual. ComfyUI Manager β†’ search "Kraken Tools" β†’ Install β†’ restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/krakenunbound/comfyui-kraken-tools
cd comfyui-kraken-tools
pip install -r requirements.txt

No model downloads - this node only reshapes what you give it. It's paired naturally with the pack's Kraken WAN Prompt Splitter (prompts) and Kraken Last Frame + Meta (chaining clips).

Where people get burned

  • Aspect detection is nearest-match, not exact. A 3:2 reference photo becomes 16:9 here, and a 4:3 frame becomes 3:4's table entry - close, but the node will crop-to-ratio via resize. If exact framing matters, don't rely on auto-detect for exotic ratios; the presets are deliberately limited to what WAN runs well.
  • Bookend mismatch. If add_bookend_frame is on but your WAN build doesn't add a trailing frame, you'll be one frame over and the generation errors or pads. Match the toggle to your pipeline.
  • multiple_of isn't free-form. The input accepts any value 1–128, but 8 or 16 are the practical choices. Setting 7 gives you technically-aligned but model-unfriendly dims.
  • No first frame = portrait default. Text-to-video with no image inputs defaults to 9:16. If you wanted landscape, connect any image or accept the vertical bias.

WAN's parameter plate is exactly the kind of thing that eats a beginner's afternoon. This node turns "why does my video look wrong" into "pick a tier, pick a duration," which is the right ratio of thinking to doing.

Categoryβš“ Kraken/WAN

Inputs (8)

NameTypeDefaultDescription
performance_tierCOMBO720p Quality Tier2 options: 720p Quality Tier, 480p Speed Tier
max_preprocess_long_sideINT1280256–2048β€”
multiple_ofINT161–128β€”
duration_secondsINT41–10β€”
fpsCOMBO165 options: 16, 24, 30, 8, 12
add_bookend_frameBOOLEANtrueβ€”
first_frameoptIMAGEβ€”
last_frameoptIMAGEβ€”

Outputs (7)

NameTypeDescription
processed_first_frameIMAGEβ€”
processed_last_frameIMAGEβ€”
widthINTβ€”
heightINTβ€”
frames(length)INTβ€”
fpsFLOATβ€”
resolution_textSTRINGβ€”