ComfyUI Node

Decode Character

The One Node Every Other Omnichar Node Hangs Off

By omnichar·Created 22 days ago·Updated 15 days ago· 96
Decode Character
  • char
  • clip
  • conditioning
  • references
  • refs
  • sheet
  • prompt
  • voice
◄styleordinal►
◄prompt►
◄archoriginals►
◄max_references0►
◄size_fromfirst►
◄fitpad►
◄voiceauto►
◄audio_position1►

Load Character opens the file. Decode Character is the one that turns it into things a graph can use: images, a prompt, conditioning, and the reference list every other node in the pack reads.

It's also where the interesting decisions live, because it's the single place that decides which references a model gets and how your prompt talks about them.

The field beginners get wrong: style

This is the one that quietly ruins renders. Reference images are addressed differently by different model families, and Decode Character's style picks the form yours was trained on:

  • ordinal - prose, "Images 1, 2 and 3 show…". What FLUX.2 reads.
  • token - <Picture N> labels. MiniMax H3's form.
  • at-image - @ImageN. Seedance's form.
  • description-only - drops positions entirely, which is what a LoRA workflow needs, because with an adapter the likeness lives in the weights and the prompt only needs the written description.

The generated text is deliberate about this. It names the positions once at the front, then refers back to them in prose rather than re-declaring a label - because repeating a reserved label like <Picture N> replayed the references on H3. If you've been hand-writing reference boilerplate for video models, this is your replacement.

Inputs that matter

char comes from Load Character. style as above. Then three optional fields do the real work:

prompt - appended after the character's own text, which is your scene, pose, camera and light. The stored description describes who the character is; this is where you write what they're doing.

arch - originals is what the character was built from; naming a model family (the shipped Klein workflow uses flux2-klein) sends the set compiled for that model at its own resolution budget. Ask for a family that has no compiled set and you get a clear "has no references compiled for X" instead of a quietly wrong render.

max_references - 0 means no cap. Any other number trims, and it trims by role: face gets half the slots, body and wardrobe a quarter each, so shrinking a character down for a five-slot video model keeps its clothing instead of losing the last two images off the end.

size_from (first, largest, smallest) and fit (pad, cover, stretch) only affect the references batch. pad letterboxes, cover crops to fill, stretch distorts - and only stretch does, which is a decent reason never to use it on a face.

clip is optional and only needed for one output. Wire it and you get conditioning straight out; leave it empty and take the text instead.

Outputs, and what each wires into

  • conditioning - only when clip is wired. Straight into your sampler, or into Character Reference Latent if you're on FLUX.2 and want latents attached.
  • references - one image batch at a common size, for models that take a single batch.
  • refs - the resolved list, carried on its own socket type. This is what feeds Character Reference, Character References Split, and Character Reference Latent. It's separate from references on purpose: one node decides the set, so the prompt's numbering can't desync from the images the model got.
  • sheet - a numbered contact sheet PNG built from the same list. Underrated - when your character comes out in the wrong jacket, it tells you in two seconds whether the wardrobe references were even in the set.
  • prompt - the final text, character line plus description plus your appended prompt, ready for a text encode.

Install

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

Restart ComfyUI. Or ComfyUI Manager, search Omnichar. Characters live in ComfyUI/models/characters/; nothing to download.

Where it goes wrong

Changing max_references, arch or style changes the numbers in the prompt and the order of the images together, which is good - but it means hand-editing prompt text to say "Images 3 and 4" is pointless, because the node regenerates that line. Set the input instead.

Two errors are worth recognising. If Decode says the character has no references compiled for an arch, switch arch back to originals or re-encode the character with that family. If it says there are no references at all after filtering, your cap removed everything - likely a character whose images are all one role and a cap smaller than the first allocation.

Last thing: if the .char file is replaced while a render is running, Decode fails on purpose - "the character file changed while this render was running" - rather than finish with a half-old, half-new character. Queue again and it uses the new file.

CategoryOmnichar

Inputs (10)

NameTypeDefaultDescription
charCHARACTER—
styleCOMBOordinalHow the model addresses reference positions. FLUX.2 reads ordinal prose, MiniMax H3 reads <Picture N>, Seedance reads @ImageN. description-only drops positions, which is what a LoRA needs.
clipoptCLIPOptional. Wire one to get CONDITIONING straight out; leave it empty and use the prompt output instead.
promptoptSTRINGAppended after the character.
archoptSTRINGoriginalsWhich reference set to send. 'originals' is what the character was built from; naming a model family sends the set compiled for it.
max_referencesoptINT00–64Cap the number sent. Slots divide between face, body and outfit rather than cutting the end, so a character keeps its wardrobe. 0 means no cap.
size_fromoptCOMBOfirst3 options: first, largest, smallest
fitoptCOMBOpad3 options: pad, cover, stretch
voiceoptCOMBOautoWhen to send the character's voice. auto sends it when this node's prompt has dialogue, a quoted line or a word like says or speaks. Only the token style (MiniMax H3) uses a voice.
audio_positionoptINT11–3Which <Audio N> the voice is. 1 when it goes into ref_audio_0 and no reference video carries sound.

Outputs (6)

NameTypeDescription
conditioningCONDITIONING—
referencesIMAGE—
refsCHARACTER_REFS—
sheetIMAGE—
promptSTRING—
voiceAUDIO—