ComfyUI Node

LingBot Sampler

The sampler that narrates every denoise step

By ALX-CODE·Created 2 months ago·Updated about a month ago· 8
LingBot Sampler
  • model
  • conditioning
  • latents
width640
height352
num_frames73
steps40
cfg3.0
shift3.00
seed42
cfg_executionsequential_sage

LingBotSampler is where the actual video happens. Everything before it - model load, prompt encode - just prepares inputs; this node runs the flow-matching denoise loop and emits the latent video tensor. It's the direct analog of a KSampler for this model, with one thing most samplers don't give you: a running play-by-play of stage, denoise step, percentage, elapsed time, ETA, and which CFG mode is actually in effect. On a model that takes minutes per clip, that narration is the difference between watching grass grow and knowing the 40-step render is 62% done.

How it works

The sampler streams the transformer onto the GPU (the model loader keeps it parked on CPU to leave room for Qwen), builds a CUDA generator from your seed, and runs a FlowUniPC multistep schedule with your CFG and shift. Output is a LINGBOT_LATENTS tensor, moved back to CPU after denoising so the next node doesn't fight the GPU. A couple of genuinely interesting details:

  • CFG execution modes. The optional cfg_execution dropdown has four choices. sequential_sage is the validated default - it runs positive and negative passes sequentially with SageAttention, the conservative path that always works. batched_native computes exact masked B=2 CFG in one pass, batched_sage_varlen is the experimental Sage variant, and hybrid_sage_safe mixes a batched tail into a sequential start. All batched modes auto-fallback above 16,384 video tokens or on CUDA OOM - the tooltip says so, and the sampler reports the fallback reason in its status line. On the author's 16 GB card, batched modes were slower than sequential, which is why sequential is the default; your GPU may differ, but don't assume batched is a free win.
  • Resolution and frame validation. It checks inputs against the model's required shapes and, critically, verifies your conditioning is complete (positive/negative embeds plus masks). Missing any of those four → clean error, not a crash.
  • The status line. When it finishes you get something like Stage 3/5 · Denoising Complete · 40/40 steps · CFG mode · sequential_sage. If a batched mode fell back, the reason is right there. That's a debugging gift.

Inputs that matter

  • model - the LINGBOT_MODEL handle from LingBotModelLoader.
  • conditioning - the LINGBOT_CONDITIONING from a prompt-encode or text-encode node.
  • width / height - must match what the prompt was conditioned at.
  • num_frames - defaults 73, step 4, and it must be 4n+1. Prefer taking this from LingBotGenerationSettings so the math is done for you.
  • steps - 40 is the reference quality; the pack's smoke tests start at 28.
  • cfg (default 3.0) and shift (default 3.0) - flow-matching schedule knobs; the published defaults are 3.0/3.0.
  • seed - fixed 42 by default. Keep it fixed while iterating; the README's whole tuning strategy is "one change at a time, seed locked."

Output: latents (type LINGBOT_LATENTS) → LingBotVAEDecode → then a VHS save node to get an MP4.

Install

Standard pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/ALX-CODE/lingbot-video-1.3b-fp8
pip install -r requirements.txt   # with ComfyUI's python

or ComfyUI Manager → search "LingBot" → restart. For the *_sage* CFG modes you need SageAttention installed to match your PyTorch/CUDA - the pack works without it (sequential native fallbacks exist) but the validated path assumes it. Launch ComfyUI with --use-sage-attention if you've installed it. The FP8 speedup this pack advertises (~1.27× sampler time in the author's smoke test) also assumes CUDA 13-era PyTorch with E4M3 support; see the loader article.

Gotchas

  • T2V only. This is the text-to-video sampler. If your conditioning came from the TI2V or FLF prompt nodes, use LingBotTI2VSampler / LingBotFLFSampler - this plain sampler has no frame-pinning logic, and the TI2V/FLF variants enforce the right conditioning source.
  • "LingBot conditioning is missing: …" - you wired the wrong node's output, or bypassed the encode. The four required keys are listed in the error.
  • Slow first step. The transformer is being streamed onto the GPU; that's normal on 16 GB.
  • If you switch to a batched CFG mode and it silently falls back, that's by design - read the status line for the reason instead of assuming it's broken.
CategoryLingBot Video

Inputs (10)

NameTypeDefaultDescription
modelLINGBOT_MODEL
conditioningLINGBOT_CONDITIONING
widthINT64016–4096
heightINT35216–4096
num_framesINT731–1001
stepsINT401–1000
cfgFLOAT3.01–30
shiftFLOAT3.000.01–20
seedINT420–18446744073709550000
cfg_executionoptCOMBOsequential_sageSequential Sage is the conservative baseline. Batched native computes exact masked B=2 CFG in one pass. Sage-varlen is experimental. All batched modes auto-fallback above 16,384 video tokens or on CUDA OOM.

Outputs (1)

NameTypeDescription
latentsLINGBOT_LATENTS