ComfyUI Node
Qwen2 Run Inference
A ComfyUI node in Qwen2 with 13 inputs and 2 outputs.
Qwen2 Run Inference
- image
- qwen2_model
- image
- caption
◄text_inputDescribe this image in great detail in one paragraph.►
◄keep_model_loadedfalse►
◄always_generate_captionsfalse►
◄max_new_tokens512►
◄temperature0.7►
◄top_p0.9►
◄min_p0.0►
◄top_k0►
◄repetition_penalty1.0►
◄min_pixels256►
◄max_pixels1280►
CategoryQwen2
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| qwen2_model | QWEN2MODEL | — | |
| text_input | STRING | Describe this image in great detail in one paragraph. | — |
| keep_model_loadedopt | BOOLEAN | false | — |
| always_generate_captionsopt | BOOLEAN | false | — |
| max_new_tokensopt | INT | 5121–1000000 | Max New Tokens maximum length of the newly generated generated text.If explicitly set to None it will be the model's max context length minus input length. |
| temperatureopt | FLOAT | 0.70–2 | This setting influences the variety in the model's responses. Lower values lead to more predictable and typical responses, while higher values encourage more diverse and less common responses. At 0, the model always gives the same response for a given input. |
| top_popt | FLOAT | 0.90–1 | This setting limits the model's choices to a percentage of likely tokens: only the top tokens whose probabilities add up to P. A lower value makes the model's responses more predictable, while the default setting allows for a full range of token choices. Think of it like a dynamic Top-K. |
| min_popt | FLOAT | 0.00–1 | Represents the minimum probability for a token to be considered, relative to the probability of the most likely token. (The value changes depending on the confidence level of the most probable token.) If your Min-P is set to 0.1, that means it will only allow for tokens that are at least 1/10th as probable as the best possible option. |
| top_kopt | INT | 00–2048 | This limits the model's choice of tokens at each step, making it choose from a smaller set. A value of 1 means the model will always pick the most likely next token, leading to predictable results. By default this setting is disabled, making the model to consider all choices. |
| repetition_penaltyopt | FLOAT | 1.00.1–5 | Helps to reduce the repetition of tokens from the input. A higher value makes the model less likely to repeat tokens, but too high a value can make the output less coherent (often with run-on sentences that lack small words). Token penalty scales based on original token's probability. |
| min_pixelsopt | INT | 2564–1280 | Images will be resized to maintain their aspect ratio within the range of min_pixels and max_pixels |
| max_pixelsopt | INT | 12804–16384 | Images will be resized to maintain their aspect ratio within the range of min_pixels and max_pixels |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| caption | STRING | — |