Nodes/ComfyUI_MieNodes/保存角色资产 · Save Character Asset 🐑
ComfyUI Node

保存角色资产 · Save Character Asset 🐑

The Retired Node That Still Writes Your Library

By MieMieeeee·Created 2 years ago·Updated 3 days ago· 280
保存角色资产 · Save Character Asset 🐑
  • image
  • audio
  • name
  • description
  • voice
  • image
  • status
  • asset
◄library_dir►
◄name(下拉选择资产)►
◄description►
◄voice►
◄new_name►
◄image_upload►
◄audio_upload►

Save Character Asset 🐑 won't show up if you search the node menu - the pack merged its per-kind asset nodes into a single Save Asset 🐑 with a kind dropdown, and kept the old classes registered under hidden purely so existing workflows still load. Which is why you may be staring at one in a graph someone shared with you, wondering whether it's safe to keep.

It is. It's the same save path, with the character half hard-coded.

What it writes

A character in this library is four fields and two files: name, a 60–100 word English description of how they look, a one-line English voice descriptor, one portrait PNG and one voice sample. On disk that's characters/<name>/character.json, images/01.png and audio/01.wav - the WAV written as 16-bit PCM by soundfile. The portrait can be a three-view or turnaround sheet as easily as a headshot; there's no face detection anywhere in this, just "here is the picture, keep it."

name is a two-mode control rather than two fields. 📋 已有资产 Existing gives you a dropdown; picking a name means overwrite it. ✏️ 新建 New reveals new_name; type there and you create a new one. You can't do both at once, which has saved me at least one accidental clobber. Names are matched case-insensitively - Yuki and yuki are the same asset, and the spelling from the first creation sticks. Characters allowed: letters, digits, -, _, CJK, up to 40.

description and voice are inserted into H3 prompts verbatim, which is the reason to bother authoring them. There's no captioner in this node rewriting your intent - what you type is what the model reads.

image and audio are the optional sockets; below them sit image_upload and audio_upload, file pickers over ComfyUI's input directory (audio under input/audio/, with drag-and-drop and paste support on the media cards). A wired socket beats a picked file, and if both are empty on an overwrite the files already on disk are preserved - handy when you only want to fix a typo in the description.

Outputs are the six you'd expect: name, description, voice, image, status, asset. status says created or overwritten; image is the stored PNG read back (so 8-bit quantised, and identical to what Load Character Asset will return); asset is the whole MIE_ASSET bundle for the prompt generator's character_N sockets.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
pip install -r ComfyUI-MieNodes/requirements.txt

Or ComfyUI Manager, search ComfyUI_MieNodes. Nothing to download - the library is a folder of PNG/JSON/WAV under the plugin's asset_library/, or $MIE_ASSET_LIBRARY if set. The library_dir widget in the input list is ignored at execution; the 📂 button opens the real folder.

Should you keep it?

If it's already in a working graph, keep it - that's exactly what the compatibility class is for, and widgets_values are byte-compatible with what it used to be, so nothing shifts. For anything new, use Save Asset 🐑 and set kind = character; it's the same code with one extra dropdown and it'll survive the next cleanup.

Things that go wrong

The one that bites: wiring an IMAGE batch (frames from a video load, say) writes several PNGs into the asset, and then Load Character Asset refuses it with does not fit the simple model (one image + one audio). Save one picture.

Memory is a real consideration too. It's an output node - nothing is written until the graph runs, so use the on-node save button instead of assuming widget edits took.

And when you overwrite, remember it overwrites: status will say overwritten and the previous picture and sample are gone. If you might want the old look back, copy characters/<name>/ out first via 📂, because there's no history here.

Categoryhidden

Inputs (9)

NameTypeDefaultDescription
library_dirSTRING—
nameCOMBO(下拉选择资产)资产名:📋 已有资产 Existing 模式下拉选名字 = 覆盖该资产;✏️ 新建 New 模式输入名字 = 新建(两者互斥二选一)。 Asset name: 📋 Existing mode picks an asset to overwrite; ✏️ New mode types a name to create — the two are mutually exclusive.
descriptionSTRING资产的英文描述(60–100 词)。角色 = 外观事实(年龄/发型/脸型/着装),场景 = 空间/陈设/光线/氛围。 注意:version=2 剧本(当前主契约)经零 LLM 编译时,描述文本不进 H3 提示词——身份与场景来自参考图;本描述供 v1 模板轨道、LLM(V2)轨道与资产库界面使用。 English description (60-100 words). Character = looks only; scene = space, furniture, lighting, atmosphere. When a version=2 script (the current contract) is compiled zero-LLM, this text never enters the H3 prompt — identity and environment come from the reference images; the description feeds the v1 template track, the LLM (V2) track and the library UI.
voiceSTRING角色音色的英文一行描述(年龄/性别/音域/语速/质感,≤200 字符);场景类型忽略本字段。 version=2 剧本经零 LLM 编译:接了角色资产时,本字段会覆盖剧本里的音色文字(用户的资产赢),写准它音色就跟着资产走;未接线的角色用剧本自带音色。v1 模板轨道与 LLM(V2)轨道直接使用本字段。 One-line English timbre descriptor for characters (age/gender/register/pace/texture, <=200 chars); ignored for scenes. On the zero-LLM v2 track a WIRED character asset's voice copy overrides the script's voice text (the user's asset wins); unwired roles keep the script's copy. The v1 template and LLM (V2) tracks use it directly.
new_nameSTRING—
imageoptIMAGE—
audiooptAUDIO—
image_uploadoptSTRING—
audio_uploadoptSTRING—

Outputs (6)

NameTypeDescription
nameSTRING—
descriptionSTRING—
voiceSTRING—
imageIMAGE—
statusSTRING—
assetMIE_ASSET—