Nodes/msch-comfyui-nodes/🎨 Lyric Sync β€” Palette
ComfyUI Node

🎨 Lyric Sync β€” Palette

The color knob for your lyric mosaic β€” pick the palette, keep the vibe

By mariobillyΒ·Created a day agoΒ·Updated a day agoΒ· 0
🎨 Lyric Sync β€” Palette
    • palette
    • palette_csv
    β—„num_colors10β–Ί
    β—„color_01#FFFFFFβ–Ί
    β—„color_02#7DEFA1β–Ί
    β—„color_03#5FE39Aβ–Ί
    β—„color_04#F25CC1β–Ί
    β—„color_05#FF74B8β–Ί
    β—„color_06#63D6F0β–Ί
    β—„color_07#9B5DE5β–Ί
    β—„color_08#B388F0β–Ί
    β—„color_09#F5B8D6β–Ί
    β—„color_10#FFFFFFβ–Ί
    β—„color_11#15151Eβ–Ί
    β—„color_12#FFD23Fβ–Ί
    β—„extra_hexβ–Ί
    β—„weight_white1β–Ί

    LyricSyncPalette is a configuration node, so let's be upfront: on its own it does nothing. It doesn't touch audio, it doesn't touch video. What it does is hand the pack's πŸŸͺ Word Mosaic node a clean, normalized list of colors to light up its scrolling tile grid with. If you've ever tweaked a mosaic and thought "this would look great in neon pink and mint," this is the node that makes that a two-click thing instead of editing a comma-separated hex string by hand.

    How it works

    The node gives you twelve fixed color-swatch slots, color_01 through color_12, each a plain hex string. The defaults are telling: white, mint greens, magenta, cyan, purple, light pink - a very synthwave-leaning set. A small bit of bundled JavaScript turns those slots into clickable color pickers in the UI (with the OS eyedropper on Windows Chrome/Edge), so you can click a swatch and sample a color straight off your reference frame. Under the hood the value is still just a hex string, so it falls back gracefully to a text field on any browser.

    Two knobs shape the mix:

    • num_colors (1–12, default 10) - how many of the swatch slots actually participate. Drop it and the rest of your carefully chosen colors silently sit out.
    • weight_white (0–8, default 1) - appends extra copies of #FFFFFF to the list. It's a sampling trick: more entries for a color means more tiles randomly land on it. Raise it when a dense mosaic reads too dark and you want more blank-looking white cells.

    Beyond the twelve slots, extra_hex accepts unlimited extra colors, one #hex per line. Every color goes through a normalizer that fills in a missing #, expands #RGB shorthand to #RRGGBB, and uppercases the result - invalid entries are dropped rather than crashing. If every single entry is invalid (don't ask how), it falls back to the pack's built-in default palette, so a mosaic never ends up empty.

    Outputs

    Two sockets, both feeding the same consumer in different ways:

    • palette (PALETTE) - wire this into the Word Mosaic node's palette_in.
    • palette_csv (STRING) - the same colors as comma-separated text, for dropping into Mosaic's plain palette text field when you'd rather not wire a socket.

    Pick one; they override each other in Mosaic's inputs.

    Installing it

    Same story as the rest of the pack - it ships in mariobilly/msch-lyric-sync, so:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mariobilly/msch-lyric-sync.git
    cd msch-lyric-sync
    python -m pip install -r requirements.txt   # same Python env as ComfyUI
    

    Restart ComfyUI and refresh the browser (the color-picker UI needs the reload). Dependencies are light - numpy, Pillow, torch and the Arabic shaping libs - no models to download for this node. One heads-up that applies to the whole pack: the README says the standalone repo is being superseded by the unified MSCH Nodes pack, and it's brand new, so its ComfyUI Manager listing may still be pending - the git clone route is the reliable one for now. Keep only one installed copy to avoid duplicate node errors.

    A small tip since this is the whole point of the node: because the palette is what defines a mosaic's mood, make it part of the workflow you save and reuse - sampling one hex from your video's dominant color before you render is the difference between a generic rainbow tile grid and something that looks designed.

    CategoryLyricSync

    Inputs (15)

    NameTypeDefaultDescription
    num_colorsINT101–12How many of the swatches below to use.
    color_01STRING#FFFFFFβ€”
    color_02STRING#7DEFA1β€”
    color_03STRING#5FE39Aβ€”
    color_04STRING#F25CC1β€”
    color_05STRING#FF74B8β€”
    color_06STRING#63D6F0β€”
    color_07STRING#9B5DE5β€”
    color_08STRING#B388F0β€”
    color_09STRING#F5B8D6β€”
    color_10STRING#FFFFFFβ€”
    color_11STRING#15151Eβ€”
    color_12STRING#FFD23Fβ€”
    extra_hexoptSTRINGMore colours, one #hex per line (unlimited).
    weight_whiteoptINT10–8Extra copies of white added β€” raises the share of white tiles.

    Outputs (2)

    NameTypeDescription
    palettePALETTEβ€”
    palette_csvSTRINGβ€”