Nodes/FunUI/FunUI Enhance Prompt
ComfyUI Node

FunUI Enhance Prompt

Rewrite the finished prompt with a language model before it is encoded. Off, or on any failure, the prompt passes through unchanged.

By digital-garbage·Created about a year ago·Updated about 12 hours ago· 20
FunUI Enhance Prompt
  • clip
  • image
  • enhanced
  • status
◄text►
◄enabledfalse►
◄instructions►
◄max_length400►
◄greedyfalse►
◄temperature0.70►
◄top_p0.92►
◄top_k50►
◄min_p0.05►
◄repetition_penalty1.30►
◄presence_penalty0.00►
◄seed0►
◄thinkingfalse►
◄encoder_file►
◄encoder_familystable_diffusion►
◄use_imagetrue►
◄shortcuts►
◄lorebooks►
◄reference_intro►
◄chat►
CategoryFunUI/Conditioning

Inputs (22)

NameTypeDefaultDescription
clipCLIPA text encoder that can generate text (Gemma, Qwen...).
textSTRING—
enabledBOOLEANfalseOff: the prompt passes through and the model is not run.
instructionsoptSTRINGWhat the model is told to do. Empty uses the built-in instructions.
max_lengthoptINT40032–4096The longest rewrite, in tokens.
greedyoptBOOLEANfalseAlways the likeliest word. Hides the sampling dials below.
temperatureoptFLOAT0.700–2—
top_poptFLOAT0.920–1—
top_koptINT501–1000top_p and min_p only apply while top_k is above 0.
min_poptFLOAT0.050–1—
repetition_penaltyoptFLOAT1.301–2—
presence_penaltyoptFLOAT0.000–2—
seedoptINT00–184467440737095500000 = a fresh rewrite every run. Any other number repeats the same rewrite.
thinkingoptBOOLEANfalseLet a thinking model reason first. Its reasoning eats the token budget.
encoder_fileoptSTRINGA text encoder file just for rewriting (Gemma, Qwen...). Empty uses the model's own encoder.
encoder_familyoptSTRINGstable_diffusionWhich family that file is for. Only used with an encoder file.
imageoptIMAGEShown to the model alongside the prompt.
use_imageoptBOOLEANtrueSend the picture (when one is connected) to the model.
shortcutsoptSTRINGShortcut names to hand the model as reference, one per line.
lorebooksoptSTRINGPaths to lorebook or shortcuts JSON files, one per line.
reference_introoptSTRINGThe line above the reference entries. Empty uses the built-in one.
chatoptSTRINGYour comments on earlier rewrites (Composer > Chat).

Outputs (2)

NameTypeDescription
enhancedSTRING—
statusSTRING—