FunUI Shot Camera
Shot Grammar for H3 Prompts, Written by Rules Instead of a Model
- settings
- text
- status
Multi-shot prompting is where video models get fiddly. You want the clip to cut at 2.4 seconds, hold a wide, then push in - and you want the same prompts to produce the same cut tomorrow. A language model will rewrite that differently every run. This node does it with rules, deterministically, and hands the text back.
It edits the [Shot N] blocks of an H3 prompt: cut times, views, camera moves. No model, no sampling, no temperature - the seed of its choices is a fingerprint of your prompt text plus a variation setting, so the same prompt gives the same shots and a higher variation re-rolls them.
What it actually does
It reads your prompt, finds the shot blocks, converts the clip's length and frame rate into a duration in seconds, and then applies whichever of the module's prose rules are switched on: where to cut (with an optional chance of uneven shot lengths), which view each shot gets, camera moves, and reframing when two adjacent shots would otherwise look the same. There's also "focus infusion", which pulls in words your project's own prompts keep returning to as things worth keeping in frame - the project input is what points at that vocabulary.
Two behaviours matter for day-to-day use. First, every one of those rules is off until you switch it on in Settings ▸ Engine. Fresh install, this node hands your text straight back with a status of unchanged - and it deliberately doesn't re-run in that case, because forcing a re-run would re-encode the H3 prompt on every single generation for no reason.
Second, a rewrite is never worth the run. If anything throws, you get your original text out and a status explaining what failed. Camera rewrites are also separable from the rest: turning the camera switch off stops cuts, views and moves while leaving other prompt work alone.
Inputs and outputs
Required:
- text - the prompt, with
[Shot N]blocks in it. Without those blocks there's nothing to annotate. - length - frames of the video. Default 124.
- frame_rate - default 25. Length divided by frame rate is the number of seconds the shots have to share; get this wrong and your cut times are wrong by exactly the ratio you got wrong.
Optional:
- settings - a
FUNUI_SETTINGSobject. This is where the per-rule switches and probabilities arrive, plus thevariationnumber that re-rolls choices. - project - the project name, used to decide which recurring words focus infusion draws on.
Outputs: text (the rewritten prompt - wire it into your encode) and status (what happened, or unchanged, or left as written (<reason>)).
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/digital-garbage/FunUI
cd FunUI && pip install -r requirements.txt
ComfyUI Manager: search FunUI. Restart. Pack page says olivv-cs/ComfyUI-FunPack; repo is now digital-garbage/FunUI - renamed, same codebase.
No extra dependencies for this node: the spacy and NVIDIA-VFX add-ons the requirements comment mentions belong to other modules (automatic camera/focus detection and RTX super resolution), installed on the next ComfyUI start after you enable them in Settings.
Then, in Settings ▸ Engine, switch on the specific behaviours you want. A node that does nothing until configured is easy to mistake for a broken node; this is one of those.
Where people get burned
Expecting it to write the prompt. It edits structure - when cuts happen, what view, what move. The subject, the look, the dialogue are yours. If your prompt is one sentence with no shot blocks, there's nothing for it to work with.
Nothing happening, repeatedly. Check Settings ▸ Engine first, then the status. unchanged means no rules fired, not a crash.
Frames vs seconds, again. length is frames. 124 at 25 fps is about five seconds; that's the budget your cuts get divided across. Feed it seconds and you'll get cuts at fractions of a second and a clip that reads as a stutter.
Treating output as stable across prompt edits. The choice seed is a fingerprint of the text, so fixing a typo can change your cut times. That's the design (same prompt, same shots), and it's worth knowing before you compare two takes and conclude the model is unstable.
Mixing it with FunUI Enhance Prompt. An LLM rewrite after this node will happily destroy the tidy [Shot N] structure you just produced. Order matters: enhance first, then shot grammar. On anything prompt-adherence-sensitive, the plainer instruction wins anyway - LLM encoders cap out around 75–100 effective tokens, and elaborate prompt scaffolding is where that budget goes to die.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| length | INT | 1241–100000 | Frames of the video: with the frame rate, how long the shots have between them. |
| frame_rate | FLOAT | 25.001–240 | — |
| settingsopt | FUNUI_SETTINGS | — | |
| projectopt | STRING | The project being made: the words focus infusion draws on are the ones this project's own prompts keep returning to. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |
| status | STRING | — |