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.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| model | JOYCAPMODEL | The JoyCaption model loaded by the DownloadAndLoadJoyCaptionModel node. | |
| image | IMAGE | Input image to caption. | |
| caption_type | COMBO | Preset caption style/template. | |
| caption_length | COMBO | Target caption length. | |
| extra_option1 | COMBO | Optional instruction appended to the prompt. | |
| extra_option2 | COMBO | Optional instruction appended to the prompt. | |
| extra_option3 | COMBO | Optional instruction appended to the prompt. | |
| extra_option4 | COMBO | Optional instruction appended to the prompt. | |
| extra_option5 | COMBO | Optional instruction appended to the prompt. | |
| person_name | STRING | Replacement value for the {name} placeholder in matching extra options. | |
| max_new_tokens | INT | 5121–2048 | Maximum generated tokens before stopping. |
| temperature | FLOAT | 0.600–2 | Sampling randomness. Lower is more deterministic. |
| top_p | FLOAT | 0.900–1 | Nucleus sampling threshold. |
| top_k | INT | 00–100 | Top-k token filter. Set 0 to disable. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| query | STRING | The final prompt sent to the model after applying caption options. |
| caption | STRING | Generated caption text. |