ComfyUI Node

JoyCaption

Runs JoyCaption on the input image to generate a caption. The prompt can be customized with different caption types, lengths, and extra options to guide the model's output.

By fpgaminer·Created about a year ago·Updated 6 months ago· 121
JoyCaption
  • model
  • image
  • query
  • caption
caption_type
caption_length
extra_option1
extra_option2
extra_option3
extra_option4
extra_option5
person_name
max_new_tokens512
temperature0.60
top_p0.90
top_k0
CategoryJoyCaption

Inputs (14)

NameTypeDefaultDescription
modelJOYCAPMODELThe JoyCaption model loaded by the DownloadAndLoadJoyCaptionModel node.
imageIMAGEInput image to caption.
caption_typeCOMBOPreset caption style/template.
caption_lengthCOMBOTarget caption length.
extra_option1COMBOOptional instruction appended to the prompt.
extra_option2COMBOOptional instruction appended to the prompt.
extra_option3COMBOOptional instruction appended to the prompt.
extra_option4COMBOOptional instruction appended to the prompt.
extra_option5COMBOOptional instruction appended to the prompt.
person_nameSTRINGReplacement value for the {name} placeholder in matching extra options.
max_new_tokensINT5121–2048Maximum generated tokens before stopping.
temperatureFLOAT0.600–2Sampling randomness. Lower is more deterministic.
top_pFLOAT0.900–1Nucleus sampling threshold.
top_kINT00–100Top-k token filter. Set 0 to disable.

Outputs (2)

NameTypeDescription
querySTRINGThe final prompt sent to the model after applying caption options.
captionSTRINGGenerated caption text.