Nodes/ComfyUI Universal Styler/🛡️ Load Scripts from Database
ComfyUI Node

🛡️ Load Scripts from Database

Scene, Camera, Lighting as Dropdowns

By KoreTeknology·Created 2 years ago·Updated 2 years ago· 66
🛡️ Load Scripts from Database
    • channel output
    • script output
    channel_input
    mode
    agents
    scenes
    script_prefix
    cameras
    motions
    styles
    lightings
    channel_follow#0001
    channel_encodefalse

    The name "Universal Styler" makes it sound like another SDXL style selector. It isn't. ComfyUI Universal Styler is a narrative-prompting kit aimed at image and video models alike - the author's own framing is a storyboard - and Load Scripts from Database is the heart of it. It composes a full prompt from six dropdowns: agent, motion, camera, scene, style, and lighting, all fed by plain CSV files sitting in your custom_nodes folder. If you're sick of pasting the same "swirling vortex, dramatic lighting, camera pan" boilerplate into every prompt, this is the node that turns that boilerplate into choices.

    How it works

    On load, the node reads six CSVs out of ComfyUI-Universal-Styler/SCRIPTS/ - agents.csv, motions.csv, cameras.csv, scenes.csv, styles.csv, lightings.csv. Each row is name,short_prompt,long_prompt. The names become your dropdown entries; the two prompt columns are just two levels of detail. When you run it, the node glues them together as script_prefix + agent + motion + camera + scene + style + lighting, using the short column or the long column depending on your mode. That's the whole mechanism: string concatenation. No model, no API, nothing heavy - the shipped code is pure Python string work.

    The mode dropdown picks which flavor you get:

    • normal - the short prompts, good for quick drafts
    • extended - the long prompts, for the final render
    • solo agent output - just the agent text, if you only care about the "who"
    • experimental - the same text but tagged with /SCE/, /MOT/, /CAM/ separators so you can see which block came from where

    The inputs that matter

    You'll touch maybe three of these. The six dropdowns are 95% of your job - that's the point. mode is the big lever: short pass to block things out, extended for the money shot. script_prefix is free text glued to the front of everything, for the subject or action you don't want living in a dropdown.

    The channel stuff is the part that confuses people. channel_input is forceInput, meaning you must wire something into it - this node expects to sit downstream of a channel source like the pack's Set Main Channel node. channel_follow (default #0001) is the label that gets passed through, and channel_encode toggles whether the output channel becomes channel_input/channel_follow or just channel_follow. Think of a channel as the name of the story branch you're building: "scene 3, camera B." The pack calls it "channel drive," and it's just a string you use to keep track.

    Two outputs, both strings: channel output (your branch label) and script output (the compiled prompt). Wire script output into your CLIP Text Encode positive prompt and you're done.

    Installing it

    ComfyUI Manager → search "ComfyUI Universal Styler" → install, then restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/KoreTeknology/ComfyUI-Universal-Styler
    

    Then restart ComfyUI. There's no requirements.txt and no model downloads - this is one of the lightest installs you'll do all week. The README's real requirement list is basically "ComfyUI and git."

    Where people get burned

    • "Error loading scenes.csv, check the console" in a dropdown means the CSV wasn't found. The pack targets Windows (that's what the README badges say) and the source hardcodes Windows-style backslash paths like custom_nodes\ComfyUI-Universal-Styler\SCRIPTS\. On Linux or macOS those backslashes are treated as literal filename characters, so the files won't resolve and every dropdown falls back to an error entry. Editing scripts_pipeline.py to use forward slashes (or os.path.join components) fixes it.
    • You edited a CSV and the dropdown didn't change. The lists are built when ComfyUI loads the node - hit Refresh in the UI after editing. Keep the name,short_prompt,long_prompt header; the parser handles quoted commas in a prompt, but the header line is required.
    • Old nodes are suddenly missing. The pack was fully rebuilt after v0.5 - the README warns old nodes "may not work as expected in your old workflows." People hit this in the wild, e.g. a pre-0.5 "U-NAI Get Text" node vanishing after an update. If an old workflow references a node you can't find, it's almost certainly this: re-add the current nodes instead of hunting for the old ones.
    Category🛡️ NAI Scripting Pipeline

    Inputs (11)

    NameTypeDefaultDescription
    channel_inputSTRING
    modeCOMBO4 options: normal, extended, solo agent output, experimental
    agentsCOMBO1 options: Error loading agents.csv, check the console
    scenesCOMBO1 options: Error loading scenes.csv, check the console
    script_prefixSTRING
    camerasCOMBO1 options: Error loading cameras.csv, check the console
    motionsCOMBO1 options: Error loading motions.csv, check the console
    stylesCOMBO1 options: Error loading styles.csv, check the console
    lightingsCOMBO1 options: Error loading lightings.csv, check the console
    channel_followSTRING#0001
    channel_encodeBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    channel outputSTRING
    script outputSTRING