Nodes/TKNodes/Video User Inputs
ComfyUI Node

Video User Inputs

Pick a video resolution by dragging a dot, not doing math

By trashkollector·Created about a year ago·Updated a day ago· 1
Video User Inputs
    • video_width
    • video_height
    • total_frames
    • fps
    • totalSeconds
    width1280
    height1280
    length_selectorUse # Seconds
    total_frames97
    num_seconds5.00
    fps24.00

    Every LTX or Wan workflow starts with the same half-dozen numbers - width, height, fps, duration, total frames - and you type them into five different nodes, hoping you remember which one you changed when the render comes out 512×768 instead of 768×512. TKVideoUserInputs is a single "value" node that holds all of them in one place and, here's the hook, lets you pick the resolution by dragging a dot on a little canvas instead of typing.

    It's the pack's flagship GUI input, and the visual is the whole point. The README calls it a "GUI for collecting inputs for Video related workflow. Easily select size with visual feedback." Underneath it's a dead-simple pass-through - but the presentation turns the most error-prone setup in video gen into something you can eyeball.

    How it works

    The Python side is nearly trivial: it takes your numbers and passes them out, with one bit of real logic - if length_selector is set to Use # Seconds, it computes total_frames = fps * num_seconds for you; if it's set to Use # Frames, it computes the duration (totalSeconds = total_frames / fps). You pick which side of that equation you want to think in, and the node does the other half.

    The front-end JavaScript is where the magic is. The width/height widgets get hidden and replaced by a 2D canvas with a draggable knob and a grid of dots at 32px steps - which conveniently are exactly the multiples LTX wants (resolution must be divisible by 32). Drag to size, and the info line under the canvas shows you the live megapixels, aspect ratio, and the frame/duration math. Hold Shift while dragging to keep the aspect ratio locked. Double-click the value areas and you get a dialog for typing an exact number.

    The inputs that matter

    Only a few of the six widgets really matter day to day. width and height (default 1280×1280, snap to 32) are the resolution, and you set them by dragging. length_selector is your choice of mental model: seconds or frames. Then whichever one you chose to not think about - total_frames (default 97) or num_seconds (default 5) - gets computed. fps (default 24) is the one you must set to match your target model: 25 for LTX, 16 for Wan in the typical setups. Get fps wrong and every derived number is wrong.

    Outputs

    Five clean value sockets - video_width, video_height, total_frames, fps, and totalSeconds - that fan out to your empty latent, your sampler, your frame-snapping nodes, anywhere else that needs them. That's the value-node pattern done right: one authoritative source, many consumers, no drifting numbers.

    Install

    Part of the TKNodes pack - the JS lives inside it, so you can't get the canvas UI without the whole pack. ComfyUI Manager, search "Handy Nodes", install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/trashkollector/TKNodes
    

    Restart ComfyUI (a full restart, not just a refresh - the extension hooks into the frontend on load). If you see the plain widgets instead of the canvas, the JS didn't load; check that the js/ folder came along with the clone and clear your browser cache. No models, no downloads, no heavy dependencies - this is a UI node, and a genuinely nice one. It's the node I'd reach for in this pack even if I ignored everything else.

    CategoryTKNodes

    Inputs (6)

    NameTypeDefaultDescription
    widthINT1280100–1288
    heightINT1280100–1288
    length_selectorCOMBOUse # Seconds2 options: Use # Seconds, Use # Frames
    total_framesINT9710–1000This value applies when length_selector = Use Frames
    num_secondsFLOAT5.002–1000This value applies when length_selector = Use Seconds
    fpsFLOAT24.0016–60FPS from video info node

    Outputs (5)

    NameTypeDescription
    video_widthINT
    video_heightINT
    total_framesINT
    fpsFLOAT
    totalSecondsFLOAT