ComfyUI Node

LingBot Text Encode

For when you already have the LingBot JSON

By ALX-CODE·Created 2 months ago·Updated about a month ago· 8
LingBot Text Encode
  • model
  • conditioning
prompt{"caption":{"comprehensive_description":{"scene_content_description":"","camera_movement_description":""}},"duration":3}
negative_prompt

LingBotTextEncode is the "no magic" prompt node. Its sibling LingBotPromptEncode rewrites your plain English into LingBot's structured JSON for you; this node assumes you already have the JSON and just wants it encoded into the conditioning the sampler eats. It's the node you reach for when you understand the LingBot schema, want total control over the scene/camera description and element actions, or are porting a prompt that was written for the official Robbyant repo.

That's also a fair warning: if you don't know the schema yet, start with LingBotPromptEncode. This node hands you the raw JSON template and expects you to fill it in correctly. Get the structure wrong and you'll get either a validation error or a silently worse video.

The input, in practice

The prompt field defaults to a skeleton:

{"caption":{"comprehensive_description":{"scene_content_description":"","camera_movement_description":""}},"duration":3}

That's the honest minimum LingBot will accept. The full schema the pack's rewriter targets includes a comprehensive_description with fields like shot type, lens size, lighting and composition, plus a prominent_elements list - each element with name, description, actions, location, pose, expression, and the rest. If you want the model to actually do something, you fill those in; the skeleton alone produces the blandest possible clip.

Two details that matter:

  • dynamicPrompts is intentionally disabled on this field. The tooltip says it outright: without that, ComfyUI's dynamic-prompts preprocessing would strip the JSON braces and you'd be encoding garbage. This node already saves you from that footgun.
  • negative_prompt is JSON only. Leave it empty to use the pack's vendored LingBot video negative prompt; anything you type here must itself be structured JSON, not the comma-separated negative-prompt prose you'd use in SD.

Output

A single conditioning output (type LINGBOT_CONDITIONING) carrying the positive and negative prompt embeddings plus their masks. It goes straight into a LingBot sampler. Note this node does not output the expanded caption or structured JSON string for preview - if you want to inspect what got encoded, you're better off in LingBotPromptEncode + LingBotPromptPreview, or just being careful about what you paste in.

How it behaves under the hood

Encode is a focused version of the same routine: validate the JSON, normalize the negative, load Qwen3VL from the model's text_encoder and processor folders, encode both prompts, move the result to CPU - then evict Qwen from VRAM before denoising. That last step is load-bearing on a 16 GB card: the transformer needs the VRAM Qwen was holding. Don't be alarmed if you see the node churn and then your GPU memory drops back down before the sampler runs; that's the design.

Install

It ships inside the pack, so it's the standard dance:

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. The node needs the model's text_encoder and processor directories present (they're part of the robbyant/lingbot-video-dense-1.3b download), and the pack's transformers>=5.3 + accelerate requirements. No separate Qwen download.

Gotchas

  • Malformed JSON gets rejected at the validation step, before Qwen even loads - good, but it means your error messages live at the front of the queue, not the middle.
  • The defaults (both description fields empty, duration 3) are a valid but useless prompt. If your first render is a smear of nothing, check whether you actually filled the JSON.
  • There's a sibling with a rewrite cache: this node has no cache because there's no rewriting - the JSON you type is the JSON you get, every time.
  • You must keep the sampler resolution in sync with what this node conditions on - same rule as the rest of the pack: changing geometry after encoding is an error on the sampler side.
CategoryLingBot Video

Inputs (3)

NameTypeDefaultDescription
modelLINGBOT_MODEL
promptSTRING{"caption":{"comprehensive_description":{"scene_content_description":"","camera_movement_description":""}},"duration":3}Structured LingBot prompt JSON. Dynamic Prompts is intentionally disabled so ComfyUI does not strip JSON braces.
negative_promptSTRINGJSON only. Leave empty to use the vendored LingBot video negative prompt.

Outputs (1)

NameTypeDescription
conditioningLINGBOT_CONDITIONING