Nodes/ComfyUI_MieNodes/Save Asset 🐑
ComfyUI Node

Save Asset 🐑

The Node That Makes a Character Reusable Instead of Re-Prompted

By MieMieeeee·Created 2 years ago·Updated 2 days ago· 269
Save Asset 🐑
  • image
  • audio
  • name
  • description
  • voice
  • image
  • status
  • asset
◄kindcharacter►
◄library_dir►
◄name(下拉选择资产)►
◄description►
◄voice►
◄new_name►
◄image_upload►
◄audio_upload►

So you finally generated a character you like. Right now that character exists as a PNG in your output folder and a prompt you'll never quite reproduce. Save Asset 🐑 is the one extra step that turns it into a thing: a named entry in an on-disk library, holding the picture, the description of how they look, and - for characters - a voice line and an audio sample. Every later shot loads the same bundle instead of re-rolling the dice.

It's also, bluntly, the node that forces you to write down what you actually mean. The description field wants 60–100 words of English fact: age, hair, face shape, wardrobe. For a scene: the space, what stands where, the lighting, the atmosphere. That text goes into the H3 prompt verbatim, so this is the moment your intent stops being vibes and becomes data.

The two modes that confuse people

kind picks character or scene, and the node reshapes itself around that choice - collapse to scene and the voice field, the audio card and the audio socket disappear, because a scene never carries them.

name is a mode toggle plus one control, not two fields. Click 📋 已有资产 Existing and you get a dropdown of existing names; whatever you pick gets overwritten. Click ✏️ 新建 New and you get the new_name text box; type a fresh name and it's created. The two are mutually exclusive on purpose - you can't accidentally half-overwrite. Execution reports which happened in status: created or overwritten.

Two quiet details underneath. Names are matched case-insensitively, and when they collide the on-disk spelling from the first creation wins. And the name is restricted to ASCII letters, digits, -, _ and CJK characters, up to 40 - no slashes, no spaces, because it's a folder name.

Media: sockets beat pickers

image (IMAGE) and audio (AUDIO) are optional sockets, and above them sit two upload pickers, image_upload and audio_upload - file dropdowns fed from ComfyUI's input directory (audio from input/audio/), with drag-and-drop and paste support on the node's media cards.

The priority rule is worth memorising: a wired socket wins over a picked file, and if both are empty on an overwrite, the files already on disk are kept. That last part is what makes this node pleasant for iteration - you can retype a description and hit save without re-supplying the portrait.

Saves are writes, not previews: this is an output node, so changes only land when the graph actually executes. The node ships a big 💾 应用保存 · Save (Queue) button that queues the graph for you, and after the run every asset node on the canvas refreshes its dropdown and thumbnail.

Outputs

name, description and voice echo back what was written (voice empty for scenes), image is the picture as stored - note it's read back from the PNG, so it's the 8-bit quantised version - status says created or overwritten, and asset is the whole MIE_ASSET bundle, ready to wire straight into character_N / scene_N on the loop plan generator or into Asset → Assets 🐑. Save-then-use in one queue run is the intended flow.

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 - no models, no checkpoints. Audio is written as 16-bit PCM WAV via soundfile, which is in the pack's requirements. Character audio is optional; a picture is not.

Things that go wrong

New-asset mode is on but new_name is empty means you flipped to ✏️ 新建 and hit save without typing a name. It's a loud, specific error - fine.

The trap is the image batch. The image input takes whatever you wire in, and if that's a batch of eight frames the save writes eight pictures - after which Load Asset refuses the asset with does not fit the simple model (one image + one audio): found 8 image(s). Pick a single frame (or a three-view sheet flattened to one image) before saving.

If a description you typed comes back mangled, suspect a stray Load Asset-side cache rather than the save: the load node keys its cache on file contents, and a graph that already ran a Load earlier in the same queue keeps the old value until you run it again.

And don't point library_dir anywhere - it's ignored. The library lives in the plugin's asset_library/ folder, or wherever $MIE_ASSET_LIBRARY says; the 📂 button opens it.

Category🐑 MieNodes/🐑 Assets

Inputs (10)

NameTypeDefaultDescription
kindCOMBOcharacter资产类型 kind:character = 角色(voice 音色 + 音频样本);scene = 场景(只有描述 + 图,音色/音频被忽略)。 Asset kind: character (voice + audio sample) or scene (description + image only; voice/audio are ignored).
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—