ComfyUI Node
IF Chat Prompt👨‍💻
ComfyUI, Support API and Local LLM providers and RAG capabilities. Processes text prompts, handles image inputs, and integrates with different language models and indexing strategies.
IF Chat Prompt👨‍💻
- images
- tool_input
- Question
- Response
- Negative
- Tool_Output
- Retrieved_Image
- Mask
â—„promptâ–ş
â—„llm_providerollamaâ–ş
â—„llm_modelâ–ľâ–ş
â—„base_iplocalhostâ–ş
â—„port11434â–ş
â—„precisionbf16â–ş
â—„attentionsdpaâ–ş
â—„assistantNoneâ–ş
â—„toolNoneâ–ş
â—„temperature1.0â–ş
â—„max_tokens2048â–ş
â—„top_k40â–ş
â—„top_p0.9â–ş
â—„repeat_penalty1.2â–ş
â—„stop_stringâ–ľâ–ş
â—„seed94687328150â–ş
â—„randomfalseâ–ş
â—„history_steps10â–ş
â—„clear_historyfalseâ–ş
â—„keep_alivefalseâ–ş
â—„text_cleanuptrueâ–ş
â—„modefalseâ–ş
â—„embellish_promptâ–ľâ–ş
â—„style_promptâ–ľâ–ş
â—„neg_promptâ–ľâ–ş
â—„fill_maskfalseâ–ş
â—„output_mask_selectâ–ş
â—„taskNoneâ–ş
â—„embedding_providersentence_transformersâ–ş
â—„embedding_modelâ–ľâ–ş
◄prime_directives—►
â—„external_api_keyâ–ş
â—„top_k_search3â–ş
â—„aspect_ratio16:9â–ş
â—„enable_RAGfalseâ–ş
â—„query_typeglobalâ–ş
â—„presetDefaultâ–ş
CategoryImpactFrames💥🎞️/IF_tools
Inputs (39)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | The main text input for the chat or query. | |
| llm_provider | COMBO | ollama | The provider of the language model to be used. |
| llm_model | COMBO | The specific language model to be used for processing. | |
| base_ip | STRING | localhost | IP address of the LLM server. |
| port | STRING | 11434 | Port number for the LLM server connection. |
| imagesopt | IMAGE | Input image(s) for visual processing or context. | |
| precisionopt | COMBO | bf16 | Select preccision on Transformer models. |
| attentionopt | COMBO | sdpa | Select attention mechanism on Transformer models. |
| assistantopt | COMBO | None | The pre-defined assistant personality to use for responses. |
| toolopt | COMBO | None | Selects a specific tool or agent for task execution. |
| temperatureopt | FLOAT | 1.00–2 | Controls randomness in output generation. Higher values increase creativity but may reduce coherence. |
| max_tokensopt | INT | 20480–18446744073709550000 | Maximum number of tokens to generate in the response. |
| top_kopt | INT | 400–100 | Limits the next token selection to the K most likely tokens. |
| top_popt | FLOAT | 0.90–1 | Cumulative probability cutoff for token selection. |
| repeat_penaltyopt | FLOAT | 1.20–10 | Penalizes repetition in generated text. |
| stop_stringopt | COMBO | Specifies a string at which text generation should stop. | |
| seedopt | INT | 946873281500–18446744073709550000 | Random seed for reproducible outputs. |
| randomopt | BOOLEAN | false | Toggles between using a fixed seed or temperature-based randomness. |
| history_stepsopt | INT | 100–18446744073709550000 | Number of previous conversation turns to consider for context. |
| clear_historyopt | BOOLEAN | false | Option to clear or retain conversation history. |
| keep_aliveopt | BOOLEAN | false | Determines whether to keep the model loaded in memory between calls. |
| text_cleanupopt | BOOLEAN | true | Applies text cleaning to the generated output. |
| modeopt | BOOLEAN | false | Switches between Stable Diffusion prompt generation and standard chat mode. |
| embellish_promptopt | COMBO | Adds pre-defined embellishments to the prompt. | |
| style_promptopt | COMBO | Applies a pre-defined style to the prompt. | |
| neg_promptopt | COMBO | Adds a negative prompt to guide what should be avoided in generation. | |
| fill_maskopt | BOOLEAN | false | Option to fill masks for Florence tasks. |
| output_mask_selectopt | STRING | — | |
| taskopt | COMBO | None | Select a Florence task. |
| embedding_provideropt | COMBO | sentence_transformers | Provider for text embedding model. |
| embedding_modelopt | COMBO | Specific embedding model to use. | |
| tool_inputopt | OMNI | Additional input for the selected tool. | |
| prime_directivesopt | STRING | System message or prime directive for the AI assistant. | |
| external_api_keyopt | STRING | If this is not empty, it will be used instead of the API key from the .env file. Make sure it is empty to use the .env file. | |
| top_k_searchopt | INT | 31–10 | Find top scored image(s) from RAG. |
| aspect_ratioopt | COMBO | 16:9 | Select the aspect ratio for the image. |
| enable_RAGopt | BOOLEAN | false | Enables Retrieval-Augmented Generation for enhanced context. |
| query_typeopt | COMBO | global | Selects the type of query strategy for RAG. |
| presetopt | COMBO | Default | 7 options: Default, Detailed, Quick, Bullet, Comprehensive, High-Level, +1 |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| Question | STRING | The original input question or prompt. |
| Response | STRING | The generated response from the language model. |
| Negative | STRING | The negative prompt used (if applicable) for guiding image generation. |
| Tool_Output | OMNI | Output from the selected tool, which can be code or any other data type. |
| Retrieved_Image | IMAGE | An image retrieved by the RAG system, if applicable. |
| Mask | MASK | Mask image generated by Florence tasks. |