Nodes/ComfyUI-YogurtNodes-LingBotVideo/LingBot Prompt Rewrite (Yogurt LingBot Video)
ComfyUI Node

LingBot Prompt Rewrite (Yogurt LingBot Video)

Prompts as structured JSON

By yogurt7771·Created about a month ago·Updated about a month ago· 1
LingBot Prompt Rewrite (Yogurt LingBot Video)
  • rewriter
  • image
  • prompt_json
  • detailed_prompt
prompt
modet2v
duration5.0
release_rewriter_after_rewritetrue

Feed LingBot a plain English sentence and it technically works - the generator auto-wraps it into a one-field JSON - and the results will look like it. LingBot rewards captions that spell out subject, environment, composition, camera, lighting, materials, and motion. This node is the bridge between the English in your head and the JSON the model was actually trained on.

It's a two-stage rewrite, which is a genuinely nice piece of design. First, with the rewriter's LoRA switched off, it asks Qwen to expand your rough idea into a detailed visual caption ("Expand this video-generation request into a detailed visual caption for 5 seconds"). Then, with the LoRA switched on, it asks for that caption mapped to a JSON object. You get both outputs: prompt_json (what you feed the Generate node's prompt) and detailed_prompt (the readable intermediate - handy for previewing or manual tweaks). If the model returns malformed JSON, which happens because it's a chat model doing a formatting job, the node falls back to json_repair before giving up rather than failing on you.

The inputs that matter

  • rewriter - the handle from Load LingBot Prompt Rewriter.
  • prompt - your rough idea. Keep it honest; the rewriter adds detail, it doesn't invent your intent.
  • mode - must match the video loader's mode (t2i, t2v, ti2v). In ti2v the image input becomes mandatory, and it should be the same reference image you'll feed Generate so the caption matches what the video starts from.
  • duration - seconds. It feeds into the caption request ("for 5 seconds") so the description matches the clip length.
  • release_rewriter_after_rewrite - defaults to true, and it does what it says: frees the 27B rewriter from VRAM after each rewrite (it even tries on error, preserving the original exception). Leave it on unless you're batching a stack of rewrites with no generation in between - otherwise you pay a full reload on every call.

Outputs and wiring

prompt_json (STRING) goes into LingBot Video Generate's prompt input. detailed_prompt (STRING) is yours to route - PreviewAny or a text save node, whatever. The README's standalone rewriter workflow (rewriter → this node → previews) is worth importing first if you want to iterate on wording without loading the video model at all.

Install

Same pack install as everything else:

cd ComfyUI/custom_nodes
git clone https://github.com/yogurt7771/ComfyUI-YogurtNodes-LingBotVideo
pip install -r custom_nodes/ComfyUI-YogurtNodes-LingBotVideo/requirements.txt

Restart ComfyUI. The Qwen base and LoRA live under ComfyUI/models/LingBotVideo/ as two separate directories, matching the dropdowns on the loader.

Common issues

VRAM contention is the recurring theme - a 27B rewriter plus a MoE video model on one 24 GB card is a recipe for OOM, which is exactly why the release toggle exists. If rewrites feel painfully slow because of constant reloading, that's the toggle working as intended; batch your rewrites with it off, then turn it back on before generating. And if your ti2v rewrite keeps erroring, check that you actually connected the image - it's required there, no exceptions.

CategoryYogurtLingBotVideo/Prompt

Inputs (6)

NameTypeDefaultDescription
rewriterYOGURT_LINGBOT_VIDEO_REWRITER
promptSTRING
modeCOMBOt2v3 options: t2v, ti2v, t2i
durationFLOAT5.00.1–120
release_rewriter_after_rewriteBOOLEANtrue
imageoptIMAGE

Outputs (2)

NameTypeDescription
prompt_jsonSTRING
detailed_promptSTRING