Nodes/LingBot-Video Dense 1.3B FP8/LingBot Plaintext Prompt + Qwen Encode
ComfyUI Node

LingBot Plaintext Prompt + Qwen Encode

Type plain English, get LingBot's weird JSON for free

By ALX-CODE·Created 2 months ago·Updated about a month ago· 8
LingBot Plaintext Prompt + Qwen Encode
  • model
  • conditioning
  • structured_json
  • expanded_caption
plaintext_promptA cinematic medium shot of a woman walking through a sunlit apartment, then turning toward the camera with a subtle smile.
structured_json_override
duration_seconds3.0
negative_prompt

LingBot doesn't take a normal prompt. It wants a structured JSON object - a comprehensive_description with scene content and camera movement fields, a list of prominent_elements, each with actions, a duration, all of it. Hand-writing that for every generation is a chore, and getting the schema slightly wrong silently degrades your video.

LingBotPromptEncode is the pack's answer: you type a normal sentence, and the model's own local Qwen3VL text encoder rewrites it into that JSON, then encodes it into the conditioning the sampler needs. No API, no key, no cloud call - the text encoder ships in the model directory and runs on your GPU, then gets evicted from VRAM before denoising so a 16 GB card can cope.

How it works

Two stages, one Qwen load:

  1. Rewrite. Your plaintext_prompt goes through the pack's adapted rewriter. It's a two-step thing: first Qwen expands your sentence into a 400–900 character natural-language caption with explicit time ranges for every action and camera move; then a second stage turns that into the full LingBot structured JSON, including camera fields (shot type, lens size, lighting, composition) and per-element actions.
  2. Encode. The same Qwen instance encodes both the rewritten JSON and the negative prompt into embeddings, which come back cached on CPU as a LINGBOT_CONDITIONING handle for the sampler.

Important honesty note the README makes: this is not Robbyant's official dedicated prompt-rewriter model - it's a structural rewriter adapted by the pack author. It will produce schema-valid JSON and one repair attempt is applied, but it "cannot guarantee semantic prompt quality." The expanded caption is exactly what you'd expect from a 1.3B-class helper: followable, occasionally flat. If a prompt keeps coming out wrong, that's the lever you have to accept or work around.

The inputs that matter

  • plaintext_prompt - write prose. "A cinematic medium shot of a woman walking through a sunlit apartment, then turning toward the camera with a subtle smile." is the default, and it's a good template: scene, subject, motion, camera.
  • structured_json_override - the escape hatch. Non-empty JSON here is encoded directly and plaintext rewriting is skipped. Use it when you have a prompt that Qwen mangles, or when you want to hand-tune the schema.
  • duration_seconds - the tooltip is explicit: connect this to Generation Settings so Qwen's action timestamps match the requested video duration. This is not optional plumbing; ignore it and your "turns at 0.5s" JSON will describe a different-length clip.
  • negative_prompt - JSON only. Leave it empty to use LingBot's vendored default negative prompt; the pack ships a default JSON negative.

Outputs: conditioning (feeds the sampler), plus structured_json and expanded_caption strings - wire those into LingBotPromptPreview to see what Qwen actually generated before you commit to a render.

There's a rewrite cache keyed on model dir, prompt text, duration, and any conditioning images - so re-running the same prompt doesn't pay the Qwen rewrite cost twice. Changing resolution or duration invalidates it, which is why prompt geometry and sampling geometry are separate nodes in this pack.

Install

Ships with the pack:

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. This node needs the model's text_encoder and processor folders present (part of the robbyant/lingbot-video-dense-1.3b download), plus transformers>=5.3 and accelerate from the pack's requirements. No Qwen download of its own - it uses the one inside the model directory, loaded with SDPA attention and use_cache off to keep memory low.

Where people get burned

  • Blank or broken prompt: the rewriter produced bad JSON, or you typed the override with invalid JSON and it bypassed the rewrite entirely. Check via LingBotPromptPreview.
  • "Enter a plaintext prompt or a structured JSON override": both fields empty - the node refuses to encode nothing.
  • Slow first run: that's the Qwen rewrite + encode happening. It's one-time per unique prompt, not per queue.
  • Dynamic Prompts stripping your JSON: not your problem - dynamicPrompts is deliberately disabled on this node's fields so ComfyUI doesn't eat your braces. If you were fighting that elsewhere, this node already handles it.
CategoryLingBot Video

Inputs (5)

NameTypeDefaultDescription
modelLINGBOT_MODEL
plaintext_promptSTRINGA cinematic medium shot of a woman walking through a sunlit apartment, then turning toward the camera with a subtle smile.Write normal prose here. Qwen expands it and creates the complete LingBot structured JSON.
structured_json_overrideSTRINGOptional advanced override. When non-empty, this JSON is encoded directly and plaintext rewriting is skipped.
duration_secondsFLOAT3.00.1–120Connect this to Generation Settings so Qwen's action timestamps match the requested video duration.
negative_promptSTRINGJSON only. Leave empty to use LingBot's vendored default negative prompt.

Outputs (3)

NameTypeDescription
conditioningLINGBOT_CONDITIONING
structured_jsonSTRING
expanded_captionSTRING