Nodes/MediaMixer/Prompt Journal
ComfyUI Node

Prompt Journal

Pick one prompt from a list by number

By DoctorDiffusion·Created 2 years ago·Updated 2 years ago· 41
Prompt Journal
    • STRING
    • STRING
    prompts
    prompt_number1

    Prompt Journal is the odd node out in MediaMixer - it doesn't touch video at all, it wrangles text. You paste in a whole list of prompts, one per line, and it hands back a single line chosen by number. That's the core of it. DoctorDiffusion built it, in their own words, "to easily batch video prompts from within ComfyUI" - so instead of hand-editing your prompt box for every clip in a sequence, you write them all out once and step through them.

    It lives in DoctorDiffusion's MediaMixer pack, and while it was born for video batching, it's genuinely useful anywhere you want a stored list of prompts you can index into - batch image runs, A/B testing wording, walking through a storyboard shot by shot.

    How it works

    The mechanism is a numbered list. You dump your prompts into a multiline text box, and the node treats each line as an entry. Give it a number, and it returns that entry. The clever part is what you pair it with: hook the number up to a primitive node set to increment, and every time the workflow runs it advances to the next prompt automatically. That's your batch loop - a queue of ten renders walks straight down a ten-line list without you touching anything. The README spells this out: "Use with a primitive to randomize or have further control."

    It's a small idea that removes a real, repetitive annoyance. Anyone who's tried to render a multi-shot video by manually swapping the prompt between every generation knows exactly why this exists.

    Inputs and outputs

    Two inputs:

    • prompts (STRING, multiline) - your list, one prompt per line. This is the journal.
    • prompt_number (INT, default 1, range 1–4096) - which line to pull. It's 1-indexed, so 1 is your first line, not 0. Wire a primitive into this to step or randomize through the list.

    Two outputs, both strings, and they do different jobs:

    • The first STRING is the single selected line - the one prompt_number points at. This is what you route into your CLIP Text Encode / positive prompt for that run.
    • The second STRING is the full text block, every line together. Useful when you want the whole journal downstream - logging it, displaying it, or feeding it somewhere that expects the complete list.

    Most workflows use the first output as the working prompt and treat the second as a reference or debug view.

    Installing it

    ComfyUI Manager: search MediaMixer, install, restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DoctorDiffusion/ComfyUI-MediaMixer.git
    cd ComfyUI-MediaMixer
    pip install -r requirements.txt
    

    then restart. It's pure text handling - no models, no dependencies of its own.

    Things to watch

    The one real gotcha is the 1-indexing. If you're used to counting from zero, you'll grab the wrong line - prompt_number of 1 gives you the first entry, 2 the second, and so on. Keep that in mind especially when you drive it with a primitive, so your increment actually lines up with your list.

    The other thing is to keep prompt_number within the number of lines you actually wrote. If you're auto-incrementing across a batch, size your run to your list - ten prompts, ten renders - so the counter doesn't march off the end. And a small formatting note: because entries are split by line, one prompt has to be one line. If you've got a paragraph-long prompt with hard line breaks in it, the node will read each break as a new entry. Keep each prompt on a single line and the numbering stays honest.

    For batching a series of shots without babysitting the prompt box, it's a genuinely handy little node - exactly the kind of quiet quality-of-life tool that makes a utility pack worth installing.

    CategoryText

    Inputs (2)

    NameTypeDefaultDescription
    promptsSTRING
    prompt_numberINT11–4096

    Outputs (2)

    NameTypeDescription
    STRINGSTRING
    STRINGSTRING