π€ COF Load Character
One .cof file, and your character arrives with their rights attached
- cof
- primary_image
- references
- prompt
- info
What this actually is
You know the drill: a character you like exists as a LoRA name, trigger words, a prompt snippet, a folder of reference images and a note in your phone about which outfit descriptor worked. Nothing in ComfyUI owns that bundle, so you rebuild it by hand every project and get it slightly wrong.
COF (Character Open File) is Yann Souetre's attempt to make the bundle a file: a .cof is a zip container with a manifest.json and assets inside - reference views, outfits, places, the identity LoRA, pre-encoded reference latents, voice samples, poses, motion clips, 3D files, a personality card, and a record of what the author allows you to do with all of it. COF Load Character is the one node you need: pick a .cof, pick a preset, and it hands you an image, reference views, and a prompt.
The preset is the bit people miss. A character ships several - a language, an age, a style - and (default) is their own default. Hence two dropdowns that look redundant and aren't: character picks who in a multi-character file, preset picks which version of them.
What goes in, what comes out
Four required widgets: cof_file (populated from your .cof files), preset, character, and max_size (default 1024, 64β4096, step 64). One optional toggle, allow_intimate, which is off for good reasons - see the rights section.
Five outputs, and the first one is the important one:
cof- the loaded character, aCOFobject. Every other node in the pack takes this and nothing else. If you're wiring an Appearance or Voice node, this is the wire.primary_image- one image, the preset's main view.references- a batch of every reference view: face, reference set, character sheet, body. Feed this to things that want several references (IP-Adapter stacks, multi-reference editing models) instead of hunting through a folder by hand. If you want one image out of that batch by name, use COF Appearance, not this socket.prompt- a ready text prompt built from the LoRA's trigger words, the character's name and visual summary, the preset's age, the outfit/accessories/place the preset applies, and its style. It's a real prompt, not a stub; concatenate or edit it.info- age, rights, and the presets of this character. Read it once.
There's no sampler here - this is a loader; you still need a checkpoint, an encoder and a KSampler.
How it works
Under the hood the reader opens the zip, resolves the preset's inheritance chain (presets can extends another preset and replace slots per category), and then filters assets by type and by what the file's rules permit. Images come out of the archive in memory, thumbnail to max_size, and get letterboxed onto a white canvas at the batch's largest dimensions - so mixed portrait/landscape references arrive white-padded, not at native resolution.
The dropdowns are filled live from the file: a small web extension asks /cof/info?file=β¦ and narrows the preset/character lists, then does the same for category nodes plugged into this loader. Consequences: press R after adding a new .cof, and API workflows can pass free-text preset ids, since the node doesn't validate against the UI list.
Install
The pack is MIT, installs nothing extra, and its pyproject.toml declares an empty dependency list - no requirements.txt, no torch upgrades, no build step waiting to fail at 2am.
cd ComfyUI/custom_nodes
git clone https://github.com/yannsouetre/ComfyUI-COF
Or search "ComfyUI-COF" in ComfyUI Manager (it's registered). Then put your files where ComfyUI registers them:
mkdir -p ComfyUI/models/cof
cp your-character.cof ComfyUI/models/cof/ # ComfyUI/input/cof/ works too
Restart ComfyUI. The nodes land under the COF category. There's a working sample - clara-mercier.cof from the COF repo's viewer/samples/ - and workflows/cof_preview.json needs no checkpoint at all. Drag that in first.
When it misbehaves
The file dropdown says "(put .cof files in models/cof or input/cof)". That's the literal placeholder - the folder is empty or the filename didn't get picked up. Files go in models/cof or input/cof only; those are the two paths the pack registers.
The preset dropdown is just (default). Either the file has one preset, or the browser extension hasn't fetched the list yet - reload the page, then re-select the file.
Your references came out white-padded. That's the letterbox, not a broken file. Raise max_size if you need detail.
allow_intimate seems to do nothing. It gates nudity and intimate variants behind the preset being 18+ and the file's allowSexualUsage, and for a real person, a consent record. That's enforced in the reader, not the UI, so no combination of widget fiddling gets around it.
The pack is new and small; there's no forum thread to search when something breaks, so read info and the console output.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| cof_file | COMBO | 1 options: (put .cof files in models/cof or input/cof) | |
| preset | COMBO | (default) | the presets of the selected file and character; (default) = the character's default preset |
| character | COMBO | (default) | for a file with several characters; (default) = the file's default character |
| max_size | INT | 102464β4096 | β |
| allow_intimateopt | BOOLEAN | false | adult content: variants marked nudity (preset 18+, consent for a real person) and intimate ones (also needs the preset's effective allowSexualUsage) |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| cof | COF | the loaded character, for the advanced COF nodes |
| primary_image | IMAGE | one image: the preset's main image |
| references | IMAGE | a batch of every reference view (face, reference set, character sheet, body) β for nodes that take several reference images; pick one with COF Appearance |
| prompt | STRING | a ready text prompt for this preset |
| info | STRING | rights, age and the presets of this character |