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 2 days agoยท 269
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 ่ฏ๏ผ‰ใ€‚่ง’่‰ฒ = ๅค–่ง‚ไบ‹ๅฎž๏ผˆๅนด้พ„/ๅ‘ๅž‹/่„ธๅž‹/็€่ฃ…๏ผ‰๏ผŒๅœบๆ™ฏ = ็ฉบ้—ด/้™ˆ่ฎพ/ๅ…‰็บฟ/ๆฐ›ๅ›ดใ€‚ English description (60-100 words). Character = looks only; scene = space, furniture, lighting, atmosphere.
voiceSTRING่ง’่‰ฒ้Ÿณ่‰ฒ็š„่‹ฑๆ–‡ไธ€่กŒๆ่ฟฐ๏ผˆๅนด้พ„/ๆ€งๅˆซ/้ŸณๅŸŸ/่ฏญ้€Ÿ/่ดจๆ„Ÿ๏ผŒโ‰ค200 ๅญ—็ฌฆ๏ผ‰๏ผ›ๅœบๆ™ฏ็ฑปๅž‹ๅฟฝ็•ฅๆœฌๅญ—ๆฎตใ€‚ One-line English timbre descriptor for characters (age/gender/register/pace/texture, <=200 chars); ignored for scenes.
new_nameSTRINGโ€”
imageoptIMAGEโ€”
audiooptAUDIOโ€”
image_uploadoptSTRINGโ€”
audio_uploadoptSTRINGโ€”

Outputs (6)

NameTypeDescription
nameSTRINGโ€”
descriptionSTRINGโ€”
voiceSTRINGโ€”
imageIMAGEโ€”
statusSTRINGโ€”
assetMIE_ASSETโ€”