BSAI-Asset-Library-Auto-List
BSAI Asset Library Auto List - auto-extract @图N asset descriptions from BSAI storyboard scripts into an asset library for film production
BSAI Asset Library Auto List | BSAI 资产库自动列表
Auto-extract
@图Nasset descriptions from a BSAI-format storyboard script, one by one. 从 BSAI 格式分镜脚本中自动提取@图N资产文字资料,依次逐个输出。
v1.1 升级说明(2026-11-16)
- 任意类别章节都能识别 — 不再写死「角色档案 / 道具档案 / 场景档案」。任何
[XXX档案][XXX设定][XXX列表][XXX清单][XXX资料][XXX库]都会被识别成XXX类别,并自动归一到角色 / 服装 / 道具 / 场景 / 风格([怪物档案]这类自定义 类别原样保留,参与遍历、不参与「仅角色/仅道具/仅场景」筛选)。[整体风格]、[全片统一运镜]、[人声分布总表]、[自检结果]这类总则章节默认 不参与提取,正文里出现的@图N引用不会被误当成资产。 - @图N 自动识别 — 支持
@图3、@图 3、@图3(全角)、@圖3(繁体),以及紧跟 后缀的写法:@图3(黄昏转初夜)、@图3-沿城台缓行。括注会单独保存进note, 描述从括注之后开始,不再把(入夜)混进画面描述。 - 同一 @图N 只算一次 — 分镜正文里
主播@图1、场景@图4-沿…之类的重复引用会被 去重,档案章节里的定义优先;没有档案的脚本才退化为全文扫描。 - 前后端同一套数字 — 后端把
total / 当前类别 / 类别计数随ui消息回传,节点面板 直接显示后端值(Asset 5 / 24 · 场景+角色1 道具1 场景22);前端原来的正则计数只 用于首次运行前的预览,并已改为去重计数。 - 多标签一行 — 一行里出现多个
@图N时,第一个作为该行资产,其余按上下文补名称 (例如→ S4 地铁口@图5会得到名称「S4 地铁口」)。
以一首 21 分镜 / 24 图的 BSAI 脚本实测:解析出 24 条 —— 角色 1(@图1)、道具 1
(@图2)、场景 22(@图3–@图24),By Tag Order 逐条遍历 24 轮全部命中,
Characters Only 1 条、Props Only 1 条、Scenes Only 22 条。
输出端口名与节点名均未变化,旧工作流可直接打开使用。
Features | 功能特性
- Auto Parse | 自动解析 — Automatically extracts assets from
[角色档案]/[道具档案]/[场景档案]sections (v1.1: any[XXX档案]-style section) 自动识别分镜脚本中的角色档案、道具档案、场景档案章节(v1.1:任意[XXX档案]章节) - Sequential Output | 依次输出 — Click "Queue Prompt" repeatedly to output each
@图Nasset one by one 每次点击运行自动输出下一个@图N资产的文字资料 - Auto Increment | 自动递增 — Index auto-increments after each execution, wraps around at the end 运行完成后索引自动+1,到达末尾循环回到第一个
- 6 Output Ports | 6个输出端口 — Full text, description, asset type,
@图Ntag, current index, total count 完整文本、描述、资产类型、@图N标签、当前索引、资产总数 - Manual Controls | 手动控制 — Prev / Reset / Next buttons at the bottom of the node 节点底部提供「上一个 / 重置 / 下一个」按钮手动跳转
- Type Filter | 按类型筛选 — Second node supports filtering by character / prop / scene, or auto-sequence through all types 第二个节点支持按角色/道具/场景筛选,或自动顺序遍历所有类型
- Zero Dependencies | 零依赖 — No external node packages required, works out of the box 无需安装任何额外节点包,开箱即用
Installation | 安装方法
Method 1: Manual Install | 方法一:手动安装
- Download or clone this repository 下载或克隆本仓库
- Place the folder inside your ComfyUI
custom_nodesdirectory 将文件夹放入 ComfyUI 的custom_nodes目录中 - Restart ComfyUI 重启 ComfyUI
Method 2: ComfyUI Manager | 方法二:ComfyUI 管理器
Search for "BSAI Asset Library Auto List" in ComfyUI Manager and install it. 在 ComfyUI 管理器中搜索 "BSAI Asset Library Auto List" 并安装。
Node Reference | 节点说明
BSAI Asset Library Auto List | 资产库自动列表
Category | 分类: BSAI / Asset Library
Inputs | 输入
| Name | 名称 | Type | Description | 说明 |
|------|------|------|-------------|------|
| script_text | 分镜脚本 | STRING (multiline) | BSAI-format storyboard script with [角色档案] / [道具档案] / [场景档案] sections | BSAI 格式分镜脚本,包含角色档案/道具档案/场景档案章节 |
| index | 索引 | INT | Current asset index (1-based). Auto-increments after each run. | 当前资产索引(从1开始),每次运行后自动递增 |
Outputs | 输出
| Name | 名称 | Type | Description | 说明 |
|------|------|------|-------------|------|
| text | 完整文本 | STRING | Complete asset text (name + @图N + description) | 完整资产文本(名称 + @图N标签 + 描述) |
| description | 描述 | STRING | Asset description text (without @图N tag) | 资产描述文本(不含 @图N 标签) |
| asset_type | 类型 | STRING | Asset type: 角色 (Character) / 道具 (Prop) / 场景 (Scene) | 资产类型:角色 / 道具 / 场景 |
| asset_tag | 标签 | STRING | The @图N tag (e.g., @图1) | @图N 标签(如 @图1) |
| index | 索引 | INT | Current asset index (1-based) | 当前资产索引(从1开始) |
| total | 总数 | INT | Total number of assets found | 解析到的资产总数 |
BSAI Asset Library By Type | 按类型提取资产
Category | 分类: BSAI / Asset Library
Extract assets filtered by type. Auto-sequence mode outputs all characters first, then all props, then all scenes. By @图N Order mode outputs all assets mixed, sorted globally by @图N number. 按类型筛选提取资产。自动顺序模式先输出所有角色,再输出所有道具,最后输出所有场景。按@图N顺序模式将全部资产混合,按@图N编号全局排序输出。
Inputs | 输入
| Name | 名称 | Type | Description | 说明 |
|------|------|------|-------------|------|
| script_text | 分镜脚本 | STRING (multiline) | BSAI-format storyboard script with [角色档案] / [道具档案] / [场景档案] sections | BSAI 格式分镜脚本,包含角色档案/道具档案/场景档案章节 |
| mode | 输出模式 | COMBO | Output mode: Auto Sequence / By @图N Order / Characters Only / Props Only / Scenes Only | 输出模式:自动顺序 / 按@图N顺序 / 仅角色 / 仅道具 / 仅场景 |
| index | 索引 | INT | Current asset index within the filtered set (1-based). Auto-increments after each run. | 当前过滤集合内的资产索引,每次运行后自动递增 |
Outputs | 输出
| Name | 名称 | Type | Description | 说明 |
|------|------|------|-------------|------|
| text | 完整文本 | STRING | Complete asset text (name + @图N + description) | 完整资产文本(名称 + @图N标签 + 描述) |
| description | 描述 | STRING | Asset description text (without @图N tag) | 资产描述文本(不含 @图N 标签) |
| asset_type | 类型 | STRING | Asset type: 角色 (Character) / 道具 (Prop) / 场景 (Scene) | 资产类型:角色 / 道具 / 场景 |
| asset_tag | 标签 | STRING | The @图N tag (e.g., @图1) | @图N 标签(如 @图1) |
| index | 索引 | INT | Current asset index within filtered set (1-based) | 当前过滤集合内的资产索引(从1开始) |
| total | 总数 | INT | Total number of assets in the filtered set | 过滤后的资产总数 |
| mode | 模式 | STRING | Current output mode (echoed back) | 当前输出模式(回显) |
Mode Options | 模式选项:
| Mode | 模式 | Behavior | 行为 | |------|------|----------|------| | 自动顺序 / Auto Sequence | Default. Outputs all characters → all props → all scenes. Index auto-increments within the full sequence. | 默认。角色全部 → 道具全部 → 场景全部,索引在完整序列中自动递增。 | | 按@图N顺序 / By @图N Order | Outputs ALL assets (characters / props / scenes) mixed, sorted globally by @图N number (1, 2, 3, ...). Index auto-increments within the full sequence. | 将角色/道具/场景全部资产混合,按@图N编号(1、2、3…)全局升序输出,索引在完整序列中自动递增。 | | 仅角色 / Characters Only | Only output assets from [角色档案] section | 只输出角色档案中的资产 | | 仅道具 / Props Only | Only output assets from [道具档案] section | 只输出道具档案中的资产 | | 仅场景 / Scenes Only | Only output assets from [场景档案] section | 只输出场景档案中的资产 |
Supported Script Format | 支持的脚本格式
[角色档案]:
苏浅@图1,波浪长发机车女郎,蜜茶色大波浪长发...
林曼@图2,马尾辫职业女性,冷冽黑直发高束马尾...
[道具档案]:
"赤焰"重机车@图3,哑光黑车身...
"冰锋"电动超跑@图4,流线型银灰车身...
[场景档案]:
城市地下车库@图6(深夜),冷色调工业顶灯...
城市街道@图7(深夜),冷色调霓虹灯光...
Parsing Rules | 解析规则:
- Sections are parsed in order: 角色档案 → 道具档案 → 场景档案 按角色档案 → 道具档案 → 场景档案的顺序解析
- Each line containing
@图Nwithin a section is treated as one asset entry 每个章节中包含@图N的行视为一个资产条目 - Assets are sorted by
@图Nindex number in the final output 最终输出按@图N编号排序 - Assets from
[分镜N]sections are NOT included — only the three archive sections 分镜章节中的 @图N 引用不纳入资产列表,仅提取三个档案章节
Usage | 使用方法
Basic Workflow | 基本流程
- Paste Script | 粘贴脚本 — Paste your BSAI-format storyboard script into the
script_textwidget 将 BSAI 格式分镜脚本文本粘贴到script_text输入框 - Auto Parse | 自动解析 — The node automatically detects all
@图Nassets and shows the count 节点自动解析所有@图N资产并显示数量 - Run | 点击运行 — Click "Queue Prompt" to output the current asset's data 点击 ComfyUI 的「运行 / Queue Prompt」按钮,输出当前索引的资产资料
- Auto Advance | 自动递增 — After execution, the index auto-increments by 1 运行完成后索引自动+1,下次运行输出下一个资产
- Wrap Around | 循环往复 — When reaching the last asset, the next run wraps back to #1 到达最后一个资产后,下一次运行自动回到第一个
Manual Controls | 手动控制
Three buttons at the bottom of the node: 节点底部有三个按钮:
| Button | 按钮 | Function | 功能 | |--------|------|----------|------| | ◀ 上一个 / Prev | Go to previous asset | 切换到上一个资产 | | 重置 / Reset | Reset index to 1 | 重置索引为 1 | | 下一个 / Next ▶ | Go to next asset | 切换到下一个资产 |
Example Workflow | 示例工作流
An example workflow is included in example_workflows/BSAI_Asset_Library_Auto_List_v1.0.json
示例工作流位于 example_workflows/BSAI_Asset_Library_Auto_List_v1.0.json
The example includes a complete storyboard script with 8 assets (2 characters + 3 props + 3 scenes) that you can test immediately. 内置完整分镜脚本示例,包含 8 个资产(2 角色 + 3 道具 + 3 场景),可直接运行测试。
Use Cases | 应用场景
- Batch Asset Upload | 批量资产上传 — Feed each asset description to an image upload node to populate your asset library one by one 将每个资产描述输出到图片上传节点,逐个填充资产库
- Character Reference Sheets | 角色参考图生成 — Output character descriptions to an image generator to create consistent character reference images 输出角色描述到图像生成节点,创建统一风格的角色参考图
- Scene Background Generation | 场景背景生成 — Output scene descriptions to generate background plates for each location 输出场景描述生成每个场景的背景底图
- Asset Library Management | 资产库管理 — Use with BSAI Asset Library Input node to systematically build your asset library from a storyboard script 配合 BSAI Asset Library Input 节点,从分镜脚本系统化构建资产库
Changelog | 更新日志
v1.2.0 (2026-09-16)
- New mode: By @图N Order — output all assets (characters/props/scenes) mixed, sorted globally by @图N number | 新增模式:按@图N顺序——角色/道具/场景全部资产混合,按@图N编号全局排序输出
- Frontend total counter and backend filter both support the new mode | 前端总数统计与后端过滤逻辑同步支持新模式
v1.1.0 (2026-08-24)
- New node: BSAI Asset Library By Type | 新增节点:按类型提取资产
- 4 output modes: Auto Sequence / Characters Only / Props Only / Scenes Only | 4种输出模式:自动顺序/仅角色/仅道具/仅场景
- Auto mode: character → prop → scene sequential output | 自动模式:角色→道具→场景顺序输出
- Index resets to 1 when script or mode changes | 切换脚本或模式时索引自动重置为1
- 7th output port: mode (echoes current mode) | 新增第7个输出端口:mode(回显当前模式)
v1.0.0 (2026-08-24)
- Initial release | 首次发布
- Auto-parse @图N assets from character/prop/scene sections | 自动解析角色/道具/场景章节中的 @图N 资产
- 6 output ports: text, description, asset_type, asset_tag, index, total | 6个输出端口:完整文本、描述、类型、标签、索引、总数
- Auto-increment index after each execution | 每次运行后索引自动递增
- Prev / Reset / Next manual control buttons | 上一个 / 重置 / 下一个手动控制按钮
- Example workflow with 8 sample assets | 包含 8 个示例资产的示例工作流
License | 许可证
MIT License
Related BSAI Plugins | 相关 BSAI 插件
- BSAI H3 Film Factory — AI video generation with storyboard-driven workflow 分镜驱动的 AI 视频生成工作流
- BSAI Asset Library — Unified asset library for images, videos, and audio 统一的图片/视频/音频资产库
- BSAI Contextual Series — Context-aware image generation series 上下文感知的图像生成系列