Nodes/ComfyUI-JZL-MiniMax-H3/JZL - 📝 生成剧本查看器
ComfyUI Node

JZL - 📝 生成剧本查看器

Actually read what the LLM wrote, without leaving the canvas

By wjluoxiao·Created 2 months ago·Updated 2 days ago· 127
JZL - 📝 生成剧本查看器
    • 剧本文件
    ◄story_name►

    Here's the workflow problem this solves. You hand a story to an LLM node, it decomposes your paragraph into nine shots, and hands them to a video sampler. If shot nine is garbage - wrong character, or a prompt that reads like a summary instead of a shot - you find out after nine generations. The diagnosis sits in a text file somewhere in output/, and you go digging through a file browser.

    JZL - 📝 生成剧本查看器 ("generated script viewer") is the pack's answer: a small terminal node that sits at the end of your graph and shows you the latest script as text, right on the canvas, with a copy button and an edit button.

    It doesn't pass anything, and that's deliberate

    The node's description is blunt about it: 0 physical input ports. story_name is a socketless input - a hidden widget with no socket - so there is nothing to wire. The front end scans your graph for a 导演台 (director) node, reads its story name and writes it in. You can also pick a story from the dropdown at the top.

    Tellingly, the visible script text isn't delivered through the output socket. The display is fetched from the pack's own REST endpoints - one resolving the latest batch for a story, one reading an arbitrary text file - and the edit button writes back through a third. execute() just walks output/jzl/{story name}/ recursively for .txt and .md files and returns them.

    That split is worth knowing, because the node can be both a viewer and a graph node without the two interfering. It's registered with is_output_node=True, so ComfyUI will run it alone - which is what you want from something whose job is "show me a file" - and the panel can populate the moment your browser loads the graph, before you've queued anything.

    What the folder convention buys you

    The 导演台 writes into output/jzl/{story name}/第NNNNN次生成/, with subfolders for 故事拆解 (raw decomposition) and 已增强剧本 (the enhanced version). The viewer resolves the highest-numbered batch, prefers the enhanced folder, falls back to the raw one. So "what did I just generate" is always the default answer, without remembering which switch was on.

    The one input is story_name - "当前故事", auto-filled or chosen from the dropdown. The one output is 剧本文件, a list of absolute paths: every script document under that story folder, newest modification first, subfolders included. Wire it if you have a use for a path list; most people just read the node.

    The control row does four things: 刷新目录 re-syncs the story name and re-reads the newest script, 复制剧本 copies the full text, 编辑剧本 opens it bigger so you can fix a bad shot and save it back to disk, and 选择剧本 lets you browse into subfolders and pin a specific file instead of following the latest.

    That last pair is the useful trick. Fix the script in the viewer, then re-run the director node in 穿透生成模式 (passthrough), which skips the LLM and samples exactly the shot blocks you hand it. One repair pass instead of hoping the model gets it right twice.

    Installing it

    Same pack, same steps:

    cd ComfyUI/custom_nodes
    git clone https://github.com/wjluoxiao/ComfyUI-JZL-MiniMax-H3
    # restart ComfyUI
    

    The pack's install warning is not optional reading: the folder must be custom_nodes/ComfyUI-JZL-MiniMax-H3/__init__.py. Unzipped one level too deep and you get Cannot import ... module for custom nodes in the log and zero nodes in the menu.

    The viewer itself is pure Python file listing, but the pack won't load without working torch/torchaudio and ComfyUI ≥ 0.29.0 (the io.Schema authoring API plus H3 support; the README recommends ≥ 0.37.0, says 0.41.x is tested). Nothing to download for this node - no models, no install_runtime.py unless you plan to run the LLM locally inside the director node. The node face is drawn by the pack's JavaScript extension, so if the panel renders as an empty grey box, hard-refresh the browser (Ctrl+Shift+R) before debugging your install.

    Where it goes wrong

    Empty panel. Expected before your first director run; the status line says so - "尚未获取剧本:先跑一次导演台,或点「📝 选择剧本」手动挑选". Nothing is broken.

    Wrong story. Auto-detect grabs a story name off the canvas. Put two director nodes in one workflow and it can latch onto the wrong one. Use the dropdown.

    A story name the filesystem mangled. Characters get sanitized on the way to a folder name, so a name full of punctuation may not be the folder you expect. Stick to short, plain names.

    The edit looked like it vanished. Edits write back to disk - but if you're following "latest" rather than a pinned file, the next director run writes a new batch and the viewer jumps to it. Your text is in the older batch folder.

    Nothing to read. This node is a reader. Check whether the director node actually had model, CLIP and VAE connected - a script-only run is a legitimate outcome there, and the viewer will happily show you a script that never became video.

    CategoryJZL/MiniMax

    Inputs (1)

    NameTypeDefaultDescription
    story_nameSTRING当前查看的故事(socketless 隐藏无端口):前端自动识别导演台故事名或手动下拉选择时写入;execute 按此列盘

    Outputs (1)

    NameTypeDescription
    剧本文件STRINGoutput/jzl/{故事名}/ 下所有剧本文档(.txt/.md,含子文件夹)的绝对路径列表(本节点主要作画布末端查看,剧本直接读盘)