Nodes/ComfyUI-IF_AI_tools/IF Chat Prompt👨‍💻
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.

By if-ai·Created 2 years ago·Updated 11 months ago· 701
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)

NameTypeDefaultDescription
promptSTRINGThe main text input for the chat or query.
llm_providerCOMBOollamaThe provider of the language model to be used.
llm_modelCOMBOThe specific language model to be used for processing.
base_ipSTRINGlocalhostIP address of the LLM server.
portSTRING11434Port number for the LLM server connection.
imagesoptIMAGEInput image(s) for visual processing or context.
precisionoptCOMBObf16Select preccision on Transformer models.
attentionoptCOMBOsdpaSelect attention mechanism on Transformer models.
assistantoptCOMBONoneThe pre-defined assistant personality to use for responses.
tooloptCOMBONoneSelects a specific tool or agent for task execution.
temperatureoptFLOAT1.00–2Controls randomness in output generation. Higher values increase creativity but may reduce coherence.
max_tokensoptINT20480–18446744073709550000Maximum number of tokens to generate in the response.
top_koptINT400–100Limits the next token selection to the K most likely tokens.
top_poptFLOAT0.90–1Cumulative probability cutoff for token selection.
repeat_penaltyoptFLOAT1.20–10Penalizes repetition in generated text.
stop_stringoptCOMBOSpecifies a string at which text generation should stop.
seedoptINT946873281500–18446744073709550000Random seed for reproducible outputs.
randomoptBOOLEANfalseToggles between using a fixed seed or temperature-based randomness.
history_stepsoptINT100–18446744073709550000Number of previous conversation turns to consider for context.
clear_historyoptBOOLEANfalseOption to clear or retain conversation history.
keep_aliveoptBOOLEANfalseDetermines whether to keep the model loaded in memory between calls.
text_cleanupoptBOOLEANtrueApplies text cleaning to the generated output.
modeoptBOOLEANfalseSwitches between Stable Diffusion prompt generation and standard chat mode.
embellish_promptoptCOMBOAdds pre-defined embellishments to the prompt.
style_promptoptCOMBOApplies a pre-defined style to the prompt.
neg_promptoptCOMBOAdds a negative prompt to guide what should be avoided in generation.
fill_maskoptBOOLEANfalseOption to fill masks for Florence tasks.
output_mask_selectoptSTRING—
taskoptCOMBONoneSelect a Florence task.
embedding_provideroptCOMBOsentence_transformersProvider for text embedding model.
embedding_modeloptCOMBOSpecific embedding model to use.
tool_inputoptOMNIAdditional input for the selected tool.
prime_directivesoptSTRINGSystem message or prime directive for the AI assistant.
external_api_keyoptSTRINGIf 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_searchoptINT31–10Find top scored image(s) from RAG.
aspect_ratiooptCOMBO16:9Select the aspect ratio for the image.
enable_RAGoptBOOLEANfalseEnables Retrieval-Augmented Generation for enhanced context.
query_typeoptCOMBOglobalSelects the type of query strategy for RAG.
presetoptCOMBODefault7 options: Default, Detailed, Quick, Bullet, Comprehensive, High-Level, +1

Outputs (6)

NameTypeDescription
QuestionSTRINGThe original input question or prompt.
ResponseSTRINGThe generated response from the language model.
NegativeSTRINGThe negative prompt used (if applicable) for guiding image generation.
Tool_OutputOMNIOutput from the selected tool, which can be code or any other data type.
Retrieved_ImageIMAGEAn image retrieved by the RAG system, if applicable.
MaskMASKMask image generated by Florence tasks.