ComfyUI Node

Rolling Artist

RollingArtist for Danbooru-tag models

By StarAsh042·Created 2 years ago·Updated 7 days ago· 3
Rolling Artist
    • prompt
    • artists_json
    • tested_count
    ◄artist_count3►
    ◄artist_top_ratio0.01►
    ◄artist_top_count1►
    ◄weight_min0.2►
    ◄weight_max1.0►
    ◄weight_total2.0►
    ◄weight_curveflat►
    ◄artists_prefixtrue►
    ◄seed1234►
    ◄use_top_prioritytrue►
    ◄sort_by_weighttrue►
    ◄exclude_artists►
    ◄force_include►
    ◄dedup_modenone►
    ◄max_attempts10►
    ◄custom_csv_path►
    ◄tested_db_path►

    If you've ever stared at a fresh seed and wished the style would surprise you instead of the composition, RollingArtist is the node for you. It picks a handful of artists from a Danbooru artist list at random, assigns each a weight, and spits out a ready-to-paste prompt string. On an Illustrious or NoobAI-family model - where a single artist tag reliably shifts the whole look - that's a lazy man's style roulette: one run for painterly, the next for cel-shaded, without touching a LoRA.

    It's not a model and not a sampler. It's a small text generator whose only job is producing that string, and it lives entirely inside ComfyUI's node graph.

    How it works

    The node ships with two CSV artist lists (1,700-ish names in danbooru_art_001.csv, plus a ~33k danbooru_art_full.csv), ordered by popularity - the README and the code both assume earlier rows = more works. artist_top_ratio (default 0.01) slices the top 1% of that list into a "top pool," and artist_top_count (default 1) decides how many of your selected artists must come from that pool. The rest get sampled from the long tail, everything's shuffled, and then weights are rolled.

    The weight logic is the part worth understanding. You give weight_min, weight_max, and weight_total (defaults 0.2, 1.0, 2.0). Every weight stays inside the min/max band, and the sum is forced to equal weight_total - clamped to whatever's actually feasible for n artists, so setting weight_total to 20 with a max of 1.0 just quietly gives you n instead. Formatting rule to remember: a weight of exactly 1.0 renders bare (artist:Jane_Smith), anything else gets the paren-and-colon treatment ((artist:John_Doe:0.8)). The whole draw is seeded, so a fixed seed reproduces the same artist lineup every time.

    The inputs that actually matter

    • artist_count (default 3): how many artists total. The README's advice stands - 3–5 keeps the style focused instead of a muddy mashup.
    • artist_top_count / artist_top_ratio: your "famous artists" dial. Raise top_count if you want the recognizable names dominating; keep the ratio small on the big CSV or the "top" pool becomes meaningless.
    • seed: this is the one you actually change to reroll. Lock it in once you find a lineup you like.
    • artists_prefix (default on): emits artist: before every name, which is exactly how these tags appear in prompts.

    Two outputs: prompt (the string - wire it into a CLIP Text Encode's text input, alongside your normal tags and quality prefix) and artists_json (a JSON blob with name/weight/top per artist, handy if you want to log or parse what got rolled). The optional exclude_artists field lets you blacklist names by exact match, and custom_csv_path points at your own artist list.

    Install

    Via ComfyUI Manager (search "ComfyUI_RollingArtist") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/StarAsh042/ComfyUI_RollingArtist
    

    Then restart ComfyUI. Good news on dependencies: requirements.txt is empty - this is pure Python stdlib, nothing to download, no model files.

    Where people get burned

    • Custom CSVs with names containing spaces or parens break the output. A name like hammer (sunset beach) in raw prompt syntax will not parse the way you think. The shipped lists are already normalized, but if you roll your own, run the bundled python modify_danbooru_csv.py to replace spaces/dashes with underscores and backslash-escape parentheses.
    • Pony doesn't do artist tags - Pony removed them in training, so this node is only really meaningful on Illustrious, NoobAI, and their fine-tunes. On Pony you'll get a string that mostly does nothing.
    • Weight surprises. Because totals get clamped, a weight_total that can't be met just silently changes. Keep it within artist_count × min to artist_count × max and there are no surprises.

    It's a niche little thing with basically zero community footprint, but if you're chasing stylistic variety on Danbooru-tag models, it does exactly one job and does it with a reproducible seed. Roll it, keep the good draws, throw away the rest.

    CategoryRollingArtist

    Inputs (17)

    NameTypeDefaultDescription
    artist_countINT31–10每次生成的艺术家数量(1-10),设为 1 就是随机抽 1 个
    artist_top_ratioFLOAT0.010.01–1Top 池占比(0.01-1.0):按 CSV 行序取前 ceil(总数×比例) 个(至少 1 个)作为 Top 池,行序越靠前的艺术家通常作品越多
    artist_top_countINT11–10每次至少抽取几个 Top 池艺术家(1-10);仅在“Top 优先抽样”开启且 Top 池非空时生效
    weight_minFLOAT0.20.1–2单个艺术家的权重下限(步长 0.1);与上限写反时自动交换,负数会被夹到 0
    weight_maxFLOAT1.00.1–2单个艺术家的权重上限(步长 0.1);每个权重都落在上限与下限之间
    weight_totalFLOAT2.00–20所有权重之和(步长 0.5),按总和精确分配,超出可行区间时夹到边界
    weight_curveCOMBOflat权重分配曲线,只影响“谁分得多”,不影响上下限与总和。flat=平坦(现状,各位权重接近,风格平均混合);dominant=主次分明(随机一位当主风格,权重明显更高);ramp=阶梯(按随机名次递减)
    artists_prefixBOOLEANtrue开启时输出 artist:名称(例如 (artist:xxx:0.8)),关闭时只输出名称本身
    seedINT12340–4294967295随机种子。同一种子在同一组参数下结果可复现;去重模式与重试次数会改变实际的抽样序列
    use_top_priorityoptBOOLEANtrue开启时优先从 Top 池抽人,并保证含 artist_top_count 个 Top 艺术家;关闭时从完整 CSV 均匀抽样
    sort_by_weightoptBOOLEANtrue开启时按权重从高到低重排提示词里的艺术家顺序;顺序会影响 full_prompt 去重键
    exclude_artistsoptSTRING要排除的艺术家名,英文逗号分隔(例如 a,b,c);被排除的名字不会出现在结果中
    force_includeoptSTRING必须出现的艺术家名,英文逗号分隔;优先级高于“排除艺术家”,数量达到 artist_count 时直接从中随机抽取
    dedup_modeoptCOMBOnone去重依据:none=只记录不判重;full_prompt=艺术家顺序与权重完全一致;artist_set=艺术家集合一致(忽略顺序与权重);artist_list=排序后的名字一致(忽略权重)
    max_attemptsoptINT101–100去重模式下的最大重试次数(1-100);重试后仍全部命中已测组合时接受最后一次结果,并输出 WARNING 日志
    custom_csv_pathoptSTRING自定义艺术家 CSV 的路径;留空使用节点目录下的 danbooru_art_001.csv
    tested_db_pathoptSTRING记录数据库(SQLite)路径;留空使用节点目录下的 rollingartist.sqlite。已测记录存在这里,更换该路径相当于重置去重进度。默认路径的数据库每次启动会被清理,要跨会话保留请显式指定

    Outputs (3)

    NameTypeDescription
    promptSTRING生成的提示词;末尾总是带一个逗号,便于直接拼接角色节点的多行输出
    artists_jsonSTRING结构化结果 JSON(艺术家 / 权重 / 是否 Top / 状态)
    tested_countSTRING当前数据库里已记录的组合数量(字符串形式,可直接接到文本节点查看)