Character Reference
Pick Slot Three, Not Your Favourite Image
- refs
- image
- role
- count
Some models don't take a batch of reference images. They take numbered slots - MiniMax H3 has ref_image_0 through ref_image_4, and the prompt addresses them by number. This node is how you fill one of those slots from a character's resolved reference list.
Where it sits in a graph
The chain is always the same shape: Load Character opens the file, Decode Character decides which references get sent and in what order, and then either one Split node fills all the slots at once or you drop one Character Reference node per slot. You wire refs - the CHARACTER_REFS output - into this node, never references. Decode's references output is the one-size image batch for models that accept a single batch, and it's a different animal.
Reach for the single-slot version when you want control the Split node doesn't give you: a model with more than five slots, or a graph where you only want to feed slot 0 with the face and leave the rest to your own images.
Inputs and outputs
refs comes from Decode Character. index is counting from zero - this is the part people trip on, so the author put it in the tooltip: index 0 goes into ref_image_0, and the prompt calls that same image "Image 1". The node is one off from the prose, forever, by design.
The image output is the reference at its own native size. That's deliberate and it's a nice touch: a slot takes one picture, so there's no reason to letterbox four references of different shapes onto one common canvas and lose detail doing it. Compare with Decode's references batch, which is forced to a common size.
role is a plain string telling you whether this reference is a face, body or cloths reference - cheap sanity check, and it's how you notice that the image you thought was the wardrobe slot is actually somebody's face. count is how many references Decode actually sent, so you know the valid index range without counting nodes in your head.
Install
Same as the rest of the pack. ComfyUI Manager, search Omnichar, or:
cd ComfyUI/custom_nodes
git clone https://github.com/omnichar/ComfyUI-Omnichar
cd ComfyUI-Omnichar
pip install -r requirements.txt
Restart ComfyUI and put your .char files in ComfyUI/models/characters/. Nothing else to download.
Common issues
Ask for an index that doesn't exist and the node tells you the count and the last valid index rather than handing you a black frame. If you genuinely want a slot empty, leave it unwired - the node's own advice is not to repeat a reference to fill space, because the prompt numbers the images it was told about, and a duplicate makes that numbering a lie the model still believes.
If refs is empty you'll get "Decode Character sent no references". That's not this node's fault: go back to Decode and check its max_references cap and its arch setting, because those two decide what the list contains. And since CHARACTER_REFS is carried on a forced socket, you won't see a widget for it - if the input looks unwireable, you're on a ComfyUI old enough that the pack's frontend extension didn't load, or you forgot to restart after install.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| refs | CHARACTER_REFS | — | |
| index | INT | 00–63 | Counting from zero, so index 0 goes in ref_image_0 and the prompt calls it image 1. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| role | STRING | — |
| count | INT | — |