Tavern Card Creation Node (zer0)
Turn a generated image into a SillyTavern character card, right in the graph
- image
A SillyTavern character card isn't a separate file - it's a PNG with a base64-encoded JSON blob hidden in a text chunk. The Tavern Card Creation Node (zer0) is the one that writes that blob. You feed it an image and a pile of character fields, and it saves a PNG that loads straight into SillyTavern (or anywhere else that speaks the v2 character-card format, like Chub). No export scripts, no JSON wrangling by hand, no leaving ComfyUI to glue the pieces together.
If you've ever made a character portrait in ComfyUI and then manually assembled the card in SillyTavern's UI, you'll immediately see why this exists. Generate the face, type the personality and first message, hit run, and the card is done in the output folder. It's a niche corner of the ecosystem - character cards are way more common in the SillyTavern/Chub world than in the r/comfyui one - but for people who straddle both, it closes a real gap.
How it works
Under the hood it builds a dict of your fields, base64-encodes it, and writes it into the PNG's chara text chunk via PIL's PngInfo. That chunk name is the v2 spec - a card reader looks for chara, decodes the base64, and reads a data object. The node wraps everything in exactly that shape, so what you get out is spec-compliant.
The fields map onto the v2 names, which is worth knowing because a couple are counterintuitive:
- first_message → saved as
first_mes - message_examples → saved as
mes_example - author → saved as
creator - version → saved as
character_version - card_name, card_description, personality, scenario, creator_notes → saved under their obvious names
Plus two that aren't card content: image (the IMAGE input - this is your character portrait, and it's what makes the card a card) and filename (default tavern_card, the PNG's name in ComfyUI's output directory). The node has no outputs; it's a terminal output node that shows the saved image in the UI like any save node would.
What to actually fill in
For a card to feel alive in SillyTavern, the essentials are card_name, personality (how the character behaves), scenario (the opening situation), and first_message (the greeting that starts the chat). message_examples is optional but makes a huge difference to roleplay quality - it's the few lines of example dialogue the model learns your character's voice from. creator_notes and version are metadata; leave them empty if you don't care.
Gotchas
- The image must be a real IMAGE tensor in the graph (wire it from a VAE decode or Load Image), not a path string.
- The saved file lands in
ComfyUI/output/, like every save node. Don't go hunting in your input folder for it. - The card contains all the basic v2 fields, but not the full optional ladder - no system prompt, post-history instructions, or character book entries. If you need those, create the card here and enrich it in SillyTavern afterward. It's a base card, not a kitchen sink.
Install
Standard for this pack, and it's light - pure PIL work, no extra models:
cd ComfyUI/custom_nodes
git clone https://github.com/zer0thgear/zer0-comfy-utils
Restart ComfyUI; it shows up under utility. Or ComfyUI Manager → Install Custom Nodes → search "zer0 Comfy Utilities". The pack's one dependency is tiktoken (for the sibling prompt splitter); the card nodes themselves need nothing beyond what ComfyUI already ships.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The image to be displayed on the tavern card. | |
| filename | STRING | tavern_card | The filename to save the tavern card as. |
| card_name | STRING | — | |
| card_description | STRING | — | |
| personality | STRING | — | |
| scenario | STRING | — | |
| first_message | STRING | — | |
| message_examples | STRING | — | |
| creator_notes | STRING | — | |
| author | STRING | — | |
| version | STRING | — |
Outputs (0)
No outputs