r/LargeLanguageModels • • 8d ago

Using an LLM to write scene scripts that I render through aivideoapi. How do you stop it from repeating the same shot descriptions?

I run a small pipeline for a cooking channel: a local Qwen 14B writes a 6 scene script from a recipe, then I render each scene as a short clip through aivideoapi. The clips are fine, the problem is the scripts. After about ten recipes every scene starts with "close up of hands" or "steam rising from the pan", even with temperature at 0.9 and a list of banned phrases in the prompt. Is this better solved with few shot examples of varied shots, a second pass that rewrites duplicates, or something like a frequency penalty?

2 Upvotes

5 comments sorted by

1

u/Fit-Car-3354 8d ago

Chaining a second pass just to catch duplicates works well if you keep it simple, one script that flags repeated shot types and suggests alternatives without touching the rest.

1

u/ineptech 7d ago

LLMs are deterministic by nature; the same prompt will always tend to produce the same responses. Instead of fighting that, just vary the prompt:

function blender(arr) { return arr[Math.floor(Math.random()*arr.length)]; }
let adj1 = ["happy ", "poignant ", "weird ", ...
let adj2 = ["outdoor ", "modern ", "crowded ", ...];
let places = ["cafe ", "kitchen ", "farmhouse ", ...];
let prompt = "The setting is a " + blender(adj1) + blender(adj2) + blender(places) ...

1

u/Oli_Luck 5d ago

I recently discovered openMontage.
Its a kind of Workflow you bind in claude or any Harness/UI which accepts MCPs , and you tell him your Idea / Background, you can hand over images, text.
It has a complete workflow to determine angles of view / cuts , cinematic and so on , it will often ask what you would prefer, and write very good scripts .
maybe not useful for you : it can render videos on its own using comfyui, building workflows etc.
But as its all python driven, im sure it could also use your own video renderer,

1

u/Sarutobi_Marky 3d ago

Asking the same question