ComfyUI Node

Load Artists

Bring your own artist roster to the randomizer

By lonelyowl13·Created about a year ago·Updated 8 months ago· 1
Load Artists
    • artist_list
    file_pathFile path, e.g. /home/username/artists.json

    Load Artists exists to answer one question: what if I don't want the randomizer's default roster? Its sibling node, Add Random Artists, ships with 15,000 danbooru artist names bundled in the pack. That's a lot of style roulette, and it includes everyone - right down to an artist the board literally tagged banned_artist, sitting at the top of the list with ~80k posts. If you'd rather roll from a shortlist of styles you actually like, Load Artists lets you hand the randomizer your own JSON file of artists and post counts, and the random picker uses yours instead.

    It's a one-job node from a tiny, basically unknown pack (artist_randomizer by lonelyowl13). No fanfare, no models, no torch - just reads a file, validates it, and hands the data upstream. Zero community reputation to lean on, so trust the source: it's a thin loader with a strict validator, and the strictness is the whole point.

    How it works

    You give it one thing - file_path, the full path to a JSON file - and it returns an artist_list of the custom ARTIST_LIST type. That output plugs into the optional artist_list input on Add Random Artists; wire them together and the randomizer uses your file instead of the bundled 15k.

    The validator is where people get caught, and it's worth reading before you build a file. Every entry must be a dictionary with exactly two fields that pass the checks:

    • name - a string
    • post_count - a positive integer (1 or greater)

    The file itself must be a JSON array, not a single object. Anything else raises a ValueError naming the offending index - the error messages are decent, so it usually tells you what to fix. If the path doesn't exist you get a FileNotFoundError instead, which is at least loud.

    The file format

    Copy this shape; it's the same one the pack's own artists.json uses:

    [
      { "name": "example_artist", "post_count": 500 },
      { "name": "another_artist", "post_count": 1200 }
    ]
    

    Point file_path at it with an absolute path. On Windows, C:\Users\You\artists.json is fine - or forward slashes, both work. A trick if you're not sure what counts: set each artist's post_count to a rough idea of how much they've published, and you can later use Add Random Artists' min_post_count slider to thin the pool without editing the file.

    Install

    It's the same pack, so one install covers both nodes. ComfyUI Manager - search "artist_randomizer" - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/lonelyowl13/artist_randomizer
    

    Restart ComfyUI after cloning. No extra Python dependencies, no model files; this node is pure standard library (json + os), and the whole pack runs offline.

    The gotcha worth knowing

    Because artist_list on Add Random Artists is optional, forgetting to wire it up doesn't error - the randomizer silently falls back to its bundled 15,000 names. So if you're sure you set up a curated list and the output is full of artists you've never heard of, check that the Load Artists output is actually connected. A missing file errors loudly; a missing connection fails silently, and silent is the harder one to debug.

    One more honest limitation: post counts are only used for filtering and don't affect anything else, and there's no weighting by popularity in the pick itself - every eligible artist has an equal shot. For a curated list of a dozen styles that's fine, even desirable. If you want the sampling skewed toward prolific artists, the bundled list is what you already have, and Load Artists isn't going to do it for you.

    CategoryLoaders

    Inputs (1)

    NameTypeDefaultDescription
    file_pathSTRINGFile path, e.g. /home/username/artists.json

    Outputs (1)

    NameTypeDescription
    artist_listARTIST_LIST