Nodes/ComfyUI_MieNodes/Delete Character Asset ๐Ÿ‘
ComfyUI Node

Delete Character Asset ๐Ÿ‘

The Hidden Node Stuck in Your Old Workflow

By MieMieeeeeยทCreated 2 years agoยทUpdated 2 days agoยท 269
Delete Character Asset ๐Ÿ‘
    • name
    • status
    โ—„library_dirโ–บ
    โ—„name๏ผˆไธ‹ๆ‹‰้€‰ๆ‹ฉ่ต„ไบง๏ผ‰โ–บ
    โ—„confirm_tokenโ–บ

    If you went looking for Delete Character Asset ๐Ÿ‘ in the node menu and couldn't find it, that's not a broken install. The pack merged its per-kind asset nodes into single nodes with a kind dropdown, and the character/scene versions were kept only as compatibility aliases: they still load and run old workflows, but they're registered under the hidden category, so nothing in the add-node search will ever surface them.

    Practically, that means there are two reasons you're reading this. Either you opened a workflow from before the merge and found one of these sitting in it, or you're hand-editing a graph JSON. Neither is a reason to panic - the node works exactly like it always did.

    What it does

    It deletes one character asset from the library: the folder holding character.json, the portrait PNG and the voice sample. No scene handling, no kind dropdown - character is baked in.

    The confirmation machinery is identical to the unified node, and it's the part people trip over. confirm_token is a hidden input you never type into. You click ๐Ÿ—‘ ๅˆ ้™ค ยท Delete on the node to arm it, then click again when it reads ๐Ÿ—‘ ็กฎ่ฎคๅˆ ้™ค๏ผŸ ยท Confirm?; the second click stamps the token with the current time and queues the graph. At execution the node accepts only a stamp under 600 seconds old. Ctrl+Enter, the Queue button, or a token carried over from a saved workflow gets a RuntimeError and deletes nothing.

    That's not paranoia for its own sake. Ctrl+Enter re-queues whatever graph is open, and a saved workflow with a live-looking token would be a one-keystroke library wipe. The pack decided the inconvenience was cheaper than the recovery.

    Inputs and outputs

    name is a dropdown of existing characters only - there's no free-text field, so you can't fat-finger a path or delete a name that doesn't exist. library_dir is present in the input list for workflow compatibility and is ignored at execution; the library root is fixed per machine (the plugin's asset_library/ folder, or $MIE_ASSET_LIBRARY if you've set it). confirm_token is the button-stamped value described above.

    Outputs are name and status, both strings. The status is genuinely informative - it reports the kind deleted, the asset name, the number of files removed and the directory that went with them.

    Install

    hidden nodes still ship with the pack, so the install is the ordinary one - ComfyUI Manager, search ComfyUI_MieNodes, or:

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

    No downloads, no models. And since it's an output node, it doesn't need to be connected to anything to run.

    Should you use it, or the other one?

    Use Delete Asset ๐Ÿ‘ and set kind to character. It's the same code path (this class literally subclasses it), it's visible in the menu, and it isn't going to disappear. The only thing this node buys you is workflow compatibility, which matters if you have a stack of old graphs and no interest in re-picking a node in each one.

    Things that go wrong

    The error you'll see is character delete needs a FRESH on-node confirmation, and in my experience it means one of two things: you queued without clicking the button twice, or the JS that builds the button isn't loaded (stale browser cache after an update - hard-refresh). Ctrl+Enter will never, ever work here, so if that's your habit, retrain it for this node specifically.

    Second: deleting leaves your graph pointing at a name that no longer exists. Every Load Character Asset or Load Asset referencing it fails on the next run. That's loud on purpose - silently skipping a missing asset would renumber every picture after it, which is a far worse bug to chase.

    Categoryhidden

    Inputs (3)

    NameTypeDefaultDescription
    library_dirSTRINGโ€”
    nameCOMBO๏ผˆไธ‹ๆ‹‰้€‰ๆ‹ฉ่ต„ไบง๏ผ‰่ฆๅˆ ้™ค็š„่ต„ไบง๏ผšไธ‹ๆ‹‰ๅชๅˆ—ๆ‰€้€‰็ฑปๅž‹้‡Œๅทฒๆœ‰็š„่ต„ไบงใ€‚ๅˆ ้™คๅ‰้œ€ๅœจ่Š‚็‚นไธŠไธคๅ‡ป็กฎ่ฎค๏ผˆ็ฌฌไบŒๅ‡ปๆŽ’้˜Ÿๆ‰ง่กŒ๏ผ‰ใ€‚ Asset to delete: lists existing assets of the chosen kind only. Deletion requires the node's two-click confirm (the second click queues it).
    confirm_tokenSTRINGโ€”

    Outputs (2)

    NameTypeDescription
    nameSTRINGโ€”
    statusSTRINGโ€”