Nodes/ComfyUI Eclipse/Character Reference Prepare
ComfyUI Node

Character Reference Prepare

One node that decides whether a reference is copied, extracted or invented

By r-vage·Created 12 months ago·Updated 14 days ago· 38
Character Reference Prepare
  • image
  • reference
  • positive
  • negative
  • source
◄roleface►
◄modereference►
◄description►
◄instructions►
◄positive_override—►
◄negative_override—►

Character reference workflows have an annoying branch point early on. Sometimes you already have a clean reference photo and you just want to use it. Sometimes you have a messy one and need a version with the jacket removed and the background gone. Sometimes you have no photo at all and only a description. Character Reference Prepare [Eclipse] is the node that makes that choice explicit, per role, instead of you copy-pasting four near-identical subgraphs.

The mode is the node

It has two widgets that matter: role (face, body, clothing, rear) and mode:

  • reference - pass the source through untouched. No preparation sampler runs.
  • extract - use the source image to generate an isolated reference of that role.
  • generate - build the reference from text alone, ignoring any source.
  • disabled - omit this role entirely, and generate nothing.

That last one is the quietly useful option. Instead of muting or bypassing a whole branch when a character has no rear reference, you set disabled and Character Reference Select returns no image downstream, leaving the graph readable.

role picks which section of prompts/character_references.json supplies the base positive and the role-specific negative - so extract on clothing asks for a garment-only pass, while face asks for identity, hair and skin tone. The file itself is extracted into ComfyUI_Eclipse/prompts/ on first startup, and edits are read on the next execution rather than at import.

Inputs

description is where you add specifics - facial features, proportions, "remove the print on the shirt". It appends to the file's positive; it doesn't replace it. instructions appends after that, for what to preserve or exclude. Both are ignored and hidden once you connect positive_override.

The image input is optional in the schema but required for reference and extract. It takes exactly one image - no batches, no lists. Crop, resize and preview upstream, because this node does not crop for you.

The two override inputs are the escape hatch. positive_override replaces the entire preparation positive, file text, description and instructions included, and it's passed through exactly as supplied; an empty connected string clears it. negative_override replaces this role's negative independently, and an empty string means no negative. Both are plain STRING sockets meant for String Multiline nodes, and both live in your workflow, not the file - editing the JSON will never update a connected override.

Outputs

  • reference - an ECLIPSE_CHARACTER_REFERENCE control object. It is not an image and not a prompt. Wire it to Character Reference Select.
  • positive - the preparation prompt for the encoder in extract/generate mode.
  • negative - the matching negative for that same encoder.
  • source - the full source image for the extraction encoder. Present in reference/extract, empty in generate/disabled.

The wiring that works: Prepare's positive/negative → an encoder and sampler for that one role → the decoded result into Select's generated input → Select's image output into the matching socket on Character Reference Pack.

Install

ComfyUI Manager, search ComfyUI_Eclipse, or:

cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse

ComfyUI_Eclipse is a big pack with a small dependency list (torch, numpy, Pillow, opencv-python, safetensors, pilgram, PyYAML, aiohttp) plus some heavier extras pinned for its audio/lyric nodes. If pip complains about imports, install into the Python that actually runs ComfyUI - for portable builds that means python_embeded\python.exe -m pip install -r .... Restart afterwards; nodes appear under 🌒 Eclipse/ Image.

Gotchas

Changing mode after you've connected an override does not rewrite the override text. The README says it plainly: update the string yourself, and don't assume a positive written for extract still makes sense in generate. Same for the file defaults on clothing, which are written to also fill in missing outfit pieces.

And treat extract as a lossy operation. You are asking a diffusion model to re-render a reference, and details it doesn't like will change - the author's own guidance is to preview the result before reusing it. If the source photo was good enough, reference mode costs you nothing and risks less.

Category🌒 Eclipse/ Image

Inputs (7)

NameTypeDefaultDescription
roleCOMBOfaceSelect the file prompt category: face for identity/hair, body for proportions, clothing for wardrobe, rear for compatible back details. Connect Select's image to the matching Pack input. Changing role does not rewrite a connected positive/negative override.
modeCOMBOreferencereference passes the source through; extract uses the source to generate an isolated reference; generate creates one from text without using the source; disabled omits it. Select skips its sampler branch in reference/disabled modes. When using overrides, update their text yourself after changing mode. Clothing defaults can also complete missing outfit pieces.
descriptionSTRINGDetails for this preparation task, such as facial features, body proportions or outfit items. Appends to the file positive; does not replace it or affect the negative. Ignored and hidden when positive_override is connected. Reference/disabled modes do not generate from this text.
instructionsSTRINGAdditional preparation instructions appended after description, such as what to preserve or exclude. Ignored and hidden when positive_override is connected. Does not change the negative or the Pack's assembly rules.
imageoptIMAGEOne source image, required for reference/extract. Generate/disabled skip it. Uses the full input image; crop/resize and preview upstream if needed. Image batches are not supported.
positive_overrideoptSTRINGConnect String Multiline to replace the entire preparation positive, including file text, description and instructions. Passed exactly as supplied; connected empty text clears it. Edit this text in the workflow: file edits will not update it. Disconnect to restore role/mode defaults. Keep it appropriate to the selected task.
negative_overrideoptSTRINGConnect String Multiline to replace this role's preparation negative independently of the positive. Connected empty text means no negative prompt. Disconnect to use the file default. This does not replace the Pack's assembly/dataset negative.

Outputs (4)

NameTypeDescription
referenceECLIPSE_CHARACTER_REFERENCERole, mode and source data for Character Reference Select. This is a control object, not an image or prompt.
positiveSTRINGPreparation prompt for the connected image encoder in extract/generate modes. Comes from the file plus details, or exactly from positive_override. Reference/disabled modes bypass preparation generation through Select.
negativeSTRINGPreparation negative for the same encoder/sampler branch. Uses this role's file negative unless negative_override is connected.
sourceIMAGEFull source image for the extraction encoder; present in reference/extract modes. No image in generate/disabled modes. Use Select's image output for the final Pack input.