Cinematic AI prompt generation for ComfyUI — a custom node that runs a three-pass pipeline to produce high-quality, camera-locked cinematic prompts for LTX video generation using Gemma 4 26B (or Qwen) via llama.cpp.
Decide → Write → Check → Fix
Most prompt nodes write once and hope for the best. PromptNodethingLD runs three passes:
- Choreography Pre-Pass — A fast JSON-forced call locks in a per-beat camera plan before writing. Style-specific allowed moves only, no drift.
- Main Generation — The LLM writes against the locked plan. Word budget scales with beat count (
120 + 95 × beats). - Lint + Auto-Repair — Regex checks catch teleport words, hype words, camera restatements, style violations, and speed conflicts. One surgical repair turn fires automatically if needed.
- Per-style camera palettes — each style enforces its own allowed moves (e.g. INTIMATE only allows dolly-in)
- Per-style negative prompts sent directly to LTX conditioning — never through the LLM
- JUMPCUT mode — every beat after the first opens with "The scene suddenly jump cuts to…", supporting insert shots, angle changes, and bounce-backs
- LTX-2.3 guide rules baked in — main action first, one action per beat, chronological mechanics, explicit light source + direction
- Camera LoRA hints — tells you which dolly/jib/static LoRAs match the generated plan
- Cinematic UI — clapper-stripe header, viewfinder frame, filmstrip timeline, pulsing REC dot, gradient generate button
- ComfyUI
- ComfyUI Manager
- llama.cpp —
llama-serverbinary - A GGUF model — Gemma 4 26B or Qwen recommended (see Models section)
Windows: Install to C:\llama\ or use the included bat installer.
Linux / macOS:
mkdir -p ~/llama
# Download the llama-server binary from https://github.com/ggerganov/llama.cpp/releases
chmod +x ~/llama/llama-serverGet a GGUF model from HuggingFace — both Gemma 4 26B and Qwen work well:
Model placement:
| Platform | Path |
|---|---|
| Windows | C:\models\ |
| Linux / macOS | ~/models/ |
The mmproj filename must start with
mmproj— rename it if needed. Example:mmproj-gemma-4-26b-a4b-it-heretic.q4_k_m.f16.gguf
VRAM guide:
- 16 GB — q4_k_s (~13 GB) works well
- 24 GB — q4_k_m (~15 GB) recommended
- Don't use a model that fills your VRAM before generation starts — it hurts output quality
Option A — ComfyUI Manager (recommended):
- Open Manager → Install via Git URL
- Paste this repo's URL
- Restart ComfyUI
Option B — Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/YOUR_USERNAME/PromptNodethingLD.gitThen restart ComfyUI.
Load workflowLD2.json from this repo into ComfyUI. The Cinematic Prompt LD node will appear in the canvas.
| Model | Size (q4_k_m) | VRAM | Notes |
|---|---|---|---|
| Gemma 4 26B | ~15 GB | 24 GB | Best output quality |
| Gemma 4 26B | ~13 GB (q4_k_s) | 16 GB | Good balance |
| Qwen 2.5 | varies | varies | Also supported |
The node auto-detects your OS:
if sys.platform == "win32":
LLAMA_EXE = r"C:\llama\llama-server.exe"
MODELS_DIR = r"C:\models"
else:
LLAMA_EXE = os.path.expanduser("~/llama/llama-server")
MODELS_DIR = os.path.expanduser("~/models")- Choreography pre-pass (JSON-forced camera plan before main generation)
- Lint + auto-repair pass
- Per-style negative prompts to LTX
- Locked camera palettes per style
- JUMPCUT mode
- Scaled word budget (
120 + 95 × beats) - LTX-2.3 guide rules baked in
- Camera LoRA hints
- Full cinematic UI redesign
- Linux / macOS support
**Sean (Lora-Daddy