Nodes/ComfyUI-FunPack/FunPack Story Writer
ComfyUI Node

FunPack Story Writer

One idea in, five connected shot prompts out

By digital-garbage·Created about a year ago·Updated 2 days ago· 18
FunPack Story Writer
    • prompt1
    • prompt2
    • prompt3
    • prompt4
    • prompt5
    user_promptA photo of a [subject] in a [setting]. [action].
    prompt1
    prompt2
    prompt3
    prompt4
    prompt5
    story_system_prompt
    sequence_system_prompt
    model_path_type
    model_pathmlabonne/NeuralLlama-3-8B-Instruct-abliterated
    llm_safetensors_file
    prompt_count3
    top_p0.75
    top_k40
    min_p0.10
    temperature0.60
    max_new_tokens512
    repetition_penalty1.00
    mode
    vision_inputPut outputs of your VL model here to make the Story Writer aware of the starting image.
    sanity_checktrue
    sanity_check_system_promptAnalyze 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_continuityfalse
    provide_current_idtrue

    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.

    CategoryFunPack

    Inputs (24)

    NameTypeDefaultDescription
    user_promptSTRINGA photo of a [subject] in a [setting]. [action].
    prompt1STRING
    prompt2STRING
    prompt3STRING
    prompt4STRING
    prompt5STRING
    story_system_promptSTRING
    sequence_system_promptSTRING
    model_path_typeCOMBO2 options: Local Safetensors, HuggingFace Pretrained
    model_pathSTRINGmlabonne/NeuralLlama-3-8B-Instruct-abliterated
    llm_safetensors_fileCOMBO0 options:
    prompt_countINT31–5
    top_pFLOAT0.750–2
    top_kINT400–1000
    min_pFLOAT0.100–1
    temperatureFLOAT0.600–2
    max_new_tokensINT51264–4096
    repetition_penaltyFLOAT1.000–3
    modeCOMBO2 options: Sequences from story, Sequences from user prompt
    vision_inputSTRINGPut outputs of your VL model here to make the Story Writer aware of the starting image.
    sanity_checkBOOLEANtrue
    sanity_check_system_promptSTRINGAnalyze 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_continuityBOOLEANfalse
    provide_current_idBOOLEANtrue

    Outputs (5)

    NameTypeDescription
    prompt1STRING
    prompt2STRING
    prompt3STRING
    prompt4STRING
    prompt5STRING