FunPack Story Writer
One idea in, five connected shot prompts out
- prompt1
- prompt2
- prompt3
- prompt4
- prompt5
FunPack Story Writer is the node that turns "a knight searching for a lost city" into five connected shot prompts, each describing one scene with characters, positioning, action, camera angle and motion. It's the plot department for the FunPack pipeline - the LLM-powered front end that feeds the shot lists which eventually become scenes in the Scene Chain Sampler or a stitch.
How it works
The flow has an extra layer most prompt nodes skip. In mode = Sequences from story (default), the model first writes a hidden story outline, then expands it into individual sequence prompts. In Sequences from user prompt, it skips the outline and generates shots directly from your request - faster, less structured, good for a single beat rather than a narrative. Either way, prompt_count (1–5) decides how many shots you get, and the outputs come out as prompt1..prompt5 (slots beyond prompt_count come back empty).
Then comes the part that makes it feel like a real assistant: sanity_check (default on) runs each generated sequence back through the same model against a sanity_check_system_prompt that rejects physically impossible actions and demands character/camera detail. It's a second LLM pass per shot, so it costs time, but it's what keeps "the knight flies" from sneaking into a prompt list the model can't honor.
Two controls shape continuity. disable_continuity (default off): when off, each later sequence is generated with the previous shot history fed back in, so the knight's appearance stays consistent across scenes - this is the closest thing this node has to a character-consistency mechanism. provide_current_id (default on) still tells the model which sequence number it's on when continuity is disabled. And vision_input is a text slot for "put the outputs of your VL model here" - paste a vision-language model's description of your starting image and the shots will stay aligned to it.
The inputs that matter
Same LLM plumbing as Prompt Enhancer: model_path_type (Local Safetensors / HuggingFace Pretrained), model_path (default mlabonne/NeuralLlama-3-8B-Instruct-abliterated), plus the sampler dials and an extra min_p (0.1). The per-shot prompt1..5 inputs let you pin instructions for specific slots while leaving others to the model.
And the same trap applies: this needs transformers >= 5.0, which the optional hpsv3 package breaks by pinning 4.45.2. Don't install both on one environment.
Install
It's part of ComfyUI-FunPack:
cd ComfyUI/custom_nodes
git clone https://github.com/olivv-cs/ComfyUI-FunPack
pip install -r requirements.txt
or via ComfyUI Manager (search "ComfyUI-FunPack"). First run downloads the 8B model.
Where it fits
Story Writer is the storyboard stage: its prompt outputs feed FunPack Prompt Combiner (to merge in a shared style base) or go straight into per-scene conditioning for the Scene Chain Sampler. The README's lorebook node pairs beautifully here too - inject worldbuilding first, then let Story Writer draft shots that respect it. It's opinionated and it makes assumptions, so read its output before committing a story to a 20-minute render.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| user_prompt | STRING | A photo of a [subject] in a [setting]. [action]. | — |
| prompt1 | STRING | — | |
| prompt2 | STRING | — | |
| prompt3 | STRING | — | |
| prompt4 | STRING | — | |
| prompt5 | STRING | — | |
| story_system_prompt | STRING | — | |
| sequence_system_prompt | STRING | — | |
| model_path_type | COMBO | 2 options: Local Safetensors, HuggingFace Pretrained | |
| model_path | STRING | mlabonne/NeuralLlama-3-8B-Instruct-abliterated | — |
| llm_safetensors_file | COMBO | 0 options: | |
| prompt_count | INT | 31–5 | — |
| top_p | FLOAT | 0.750–2 | — |
| top_k | INT | 400–1000 | — |
| min_p | FLOAT | 0.100–1 | — |
| temperature | FLOAT | 0.600–2 | — |
| max_new_tokens | INT | 51264–4096 | — |
| repetition_penalty | FLOAT | 1.000–3 | — |
| mode | COMBO | 2 options: Sequences from story, Sequences from user prompt | |
| vision_input | STRING | Put outputs of your VL model here to make the Story Writer aware of the starting image. | — |
| sanity_check | BOOLEAN | true | — |
| sanity_check_system_prompt | STRING | Analyze the given sequence and perform a correction, if the sequence does not match the given requirements: 1. The sequence is related to given user's prompt. 2. The sequence contains only physically possible actions. 3. The sequence contains information about characters, their appearances, positioning, actions, camera angle, focus and zoom. 4. The sequence is fully describing the requested action. Output ONLY corrected sequence, or return it unchanged if it matches the requirements. No additional text except for sequence is allowed. | — |
| disable_continuity | BOOLEAN | false | — |
| provide_current_id | BOOLEAN | true | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| prompt1 | STRING | — |
| prompt2 | STRING | — |
| prompt3 | STRING | — |
| prompt4 | STRING | — |
| prompt5 | STRING | — |