ComfyUI Node

Prompter

Writes one text-to-image prompt with the chat model of the connected LM Loader, from a short brief (text), a reference image, or both. include identity and exclude identity (the person's appearance written or left to a character LoRA) choose a built-in prompt: with a brief the brief prompt, the brief after it and the image not used; with an image alone the image prompt, after the image. none sends the brief and / or the image (the image first) with no prompt, for a prompter LoRA of your own. A connected instruction replaces the built-in prompt. Thinking off, no system turn, at most 600 tokens, the image's long side capped at 1024; sampling temperature 0.7, top_p 0.8, top_k 20, no presence penalty, or a connected LM Config's (the model's own defaults with the fields edited there). With a CLIP connected, conditioning is the prompt encoded as CLIP Text Encode encodes it, the positive only, after the model is unloaded when the LM Loader does not keep it.

By 0xBeycan·Created 21 days ago·Updated about 24 hours ago· 2
Prompter
  • lm
  • image
  • clip
  • config
  • text
  • conditioning
◄text►
◄instructionsinclude identity►
◄seed0►
◄instruction—►
CategoryBCNodes/lm

Inputs (8)

NameTypeDefaultDescription
lmBC_LMThe chat model, from an LM Loader: its model, precision and LoRA (at its strength), and whether it stays loaded after this node (off: unloaded once the prompt is written, before the clip encode, after an error too).
textSTRINGThe brief: the picture you want, short and informal, in any language. With include / exclude identity it follows the built-in brief prompt and a connected image is not used; with none it is the user text itself, after the image when one is connected. Empty (or only whitespace): the image alone is used.
instructionsCOMBOinclude identityThe built-in prompt. include identity: the person's appearance is written (as the brief gives it, or read off the image). exclude identity: nothing about how the person looks, for a character LoRA that carries it. Both write the subject as a woman or a man, from the brief (the gender it states, else the one its cues suggest) or the image, in one paragraph that opens with the shot type and camera height. A brief uses the brief prompt, an image alone the image prompt. none: no prompt, the model gets the brief and / or the image alone (a prompter LoRA of your own). A connected instruction replaces it.
seedINT00–18446744073709550000The sampling seed. Its control starts at fixed, so queueing again gives the cached prompt instead of a new run; set it to randomize for a new prompt each time.
imageoptIMAGEA reference photograph: one image (a batch of more frames is an error). Used when the brief is empty, or with instructions none (the image, then the brief); with include / exclude identity and a brief it is not used. The model sees it with its long side capped at 1024 (never enlarged), then sized as its family sizes images.
instructionoptSTRINGYour own prompt in place of the built-in one, with any instructions value: before the brief, a blank line between, or after the image when the brief is empty. Not connected, or only whitespace: instructions decides. The answer is cut at 600 tokens.
clipoptCLIPA CLIP (text encoder) for the conditioning output: the prompt is encoded as the standard CLIP Text Encode encodes it. Not connected: leave conditioning unlinked (linked, it is an error asking for a CLIP); text works either way.
configoptBC_LM_CONFIGSampling from an LM Config node in place of Prompter's own (temperature 0.7, top_p 0.8, top_k 20, no presence penalty): the model's thinking-off defaults with the fields edited there, or fed by a link, over them. Not connected: Prompter's own.

Outputs (2)

NameTypeDescription
textSTRINGThe prompt the model wrote, its surrounding whitespace stripped: the positive prompt. Take it to your own encode node when the workflow needs another one.
conditioningCONDITIONINGThe prompt encoded by the connected CLIP, as CLIP Text Encode encodes it: the positive conditioning only (the negative comes from elsewhere). Needs the clip input.