https://github.com/if-ai/comfyui-if_ai_tools
ComfyUI-IF_AI_tools is a set of custom nodes for ComfyUI that allows you to generate prompts using a local Large Language Model (LLM) via Ollama. This tool enables you to enhance your image generation workflow by leveraging the power of language models.
https://github.com/if-ai/comfyui-if_ai_tools
anthropic comfyui flux gemini graphrag groq koboldcpp llamacpp lmstudio mistral ocr ollama omost rag stable-diffusion supervision textgeneration transformers xai
Last synced: 5 days ago
JSON representation
ComfyUI-IF_AI_tools is a set of custom nodes for ComfyUI that allows you to generate prompts using a local Large Language Model (LLM) via Ollama. This tool enables you to enhance your image generation workflow by leveraging the power of language models.
- Host: GitHub
- URL: https://github.com/if-ai/comfyui-if_ai_tools
- Owner: if-ai
- License: mit
- Created: 2024-03-12T10:14:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-09T09:11:32.000Z (2 months ago)
- Last Synced: 2025-05-15T13:08:44.850Z (5 days ago)
- Topics: anthropic, comfyui, flux, gemini, graphrag, groq, koboldcpp, llamacpp, lmstudio, mistral, ocr, ollama, omost, rag, stable-diffusion, supervision, textgeneration, transformers, xai
- Language: Python
- Homepage: https://ko-fi.com/impactframes
- Size: 18 MB
- Stars: 638
- Watchers: 8
- Forks: 48
- Open Issues: 51
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://youtu.be/QAnapTWnawU?si=Uomv_NXT2n2Mg9rG)
# ComfyUI-IF_AI_tools
ComfyUI-IF_AI_tools is a set of custom nodes to Run Local and API LLMs and LMMs, Features OCR-RAG (Bialdy), nanoGraphRAG, Supervision Object Detection, supports Ollama, LlamaCPP LMstudio, Koboldcpp, TextGen, Transformers or via APIs Anthropic, Groq, OpenAI, Google Gemini, Mistral, xAI and create your own charcters assistants (SystemPrompts) with custom presets and muchmore
################# ATENTION ####################
** I am Moving the prompt generation to this new node PromptImaGen
https://github.com/if-ai/ComfyUI-IF_AI_PromptImaGen/tree/main
You will need to uninstall or disable this repo to use the PromptImaGen **
###############################################
# Prerequisite Installation (Poppler)To ensure compatibility and functionality with all tools, you may need `poppler` for PDF-related operations. Use `scoop` to install `poppler` on Windows:
### Step 1: Install `scoop` (if not already installed)
If you haven't installed `scoop` yet, run the following command in **PowerShell**:```powershell
iwr -useb get.scoop.sh | iex
```
Step 2: Install poppler with scoop
Once scoop is installed, you can install poppler by running:windows 10+ istall scoop and then
```powershell
scoop install poppler
```
Debian/Ubuntu
```bash
sudo apt-get install poppler-utils
```
MacOS
```bash
brew install poppler
```check is working
```powershell
pdftotext -v
```### Install Ollama
You can technically use any LLM API that you want, but for the best expirience install Ollama and set it up.
- Visit [ollama.com](https://ollama.com) for more information.To install Ollama models just open CMD or any terminal and type the run command follow by the model name such as
```powershell
ollama run llama3.2-vision
```
If you want to use omost
```bash
ollama run impactframes/dolphin_llama3_omost
```
if you need a good smol model
```bash
ollama run ollama run llama3.2
```Optionally Set enviromnet variables for any of your favourite LLM API keys "XAI_API_KEY", "GOOGLE_API_KEY", "ANTHROPIC_API_KEY", "MISTRAL_API_KEY", "OPENAI_API_KEY" or "GROQ_API_KEY" with those names or otherwise
it won't pick it up you can also use .env file to store your keys## Features
_[NEW]_ nanoGraphRAG,
_[NEW]_ OCR-RAG ColPali & ColQwen (Bialdy),
_[NEW]_ Supervision Object Detection Florence2
_[NEW]_ Endpoints xAI, Transformers,
_[NEW]_ IF_Assistants System Prompts with Reasoning/Reflection/Reward Templates and custom presets- Gemini, Groq, Mistral, OpenAI, Anthropic, Google, xAI, Transformers, Koboldcpp, TextGen, LlamaCPP, LMstudio, Ollama
- Omost_tool the first tool
- Vision Models Haiku, Florence2
- [Ollama-Omost]https://ollama.com/impactframes/dolphin_llama3_omost can be 2x to 3x faster than other Omost Models
LLama3 and Phi3 IF_AI Prompt mkr models released
`ollama run impactframes/llama3_ifai_sd_prompt_mkr_q4km:latest`
`ollama run impactframes/ifai_promptmkr_dolphin_phi3:latest`
https://huggingface.co/impactframes/llama3_if_ai_sdpromptmkr_q4km
https://huggingface.co/impactframes/ifai_promptmkr_dolphin_phi3_gguf
## Installation
1. Open the manager search for IF_AI_tools and install### Install ComfyUI-IF_AI_tools -hardest way
1. Navigate to your ComfyUI `custom_nodes` folder, type `CMD` on the address bar to open a command prompt,
and run the following command to clone the repository:
```bash
git clone https://github.com/if-ai/ComfyUI-IF_AI_tools.git
```
OR
1. In ComfyUI protable version just dounle click `embedded_install.bat` or type `CMD` on the address bar on the newly created `custom_nodes\ComfyUI-IF_AI_tools` folder type
```bash
H:\ComfyUI_windows_portable\python_embeded\python.exe -m pip install -r requirements.txt
```
replace `C:\` for your Drive letter where you have the ComfyUI_windows_portable directory2. On custom environment activate the environment and move to the newly created ComfyUI-IF_AI_tools
```bash
cd ComfyUI-IF_AI_tools
python -m pip install -r requirements.txt
```## Related Tools
- [IF_prompt_MKR](https://github.com/if-ai/IF_prompt_MKR)
- A similar tool available for Stable Diffusion WebUI## Videos
AIFuzz made a great video usining ollama and IF_AI tools[](https://youtu.be/nZx5g3TGsNc?si=DFIqFuPoyKY1qJ2n)
Also Future thinker @ Benji Thankyou both for putting out this awesome videos
[](https://youtu.be/EQZWyn9eCFE?si=jgC28GL7bwFWj_sK)
## Example using normal Model
ancient Megastructure, small lone figure
'A dwarfed figure standing atop an ancient megastructure, worn stone towering overhead. Underneath the dim moonlight, intricate engravings adorn the crumbling walls. Overwhelmed by the sheer size and age of the structure, the small figure appears lost amidst the weathered stone behemoth. The background reveals a dark landscape, dotted with faint twinkles from other ancient structures, scattered across the horizon. The silent air is only filled with the soft echoes of distant whispers, carrying secrets of times long past. ethereal-fantasy-concept-art, magical-ambiance, magnificent, celestial, ethereal-lighting, painterly, epic, majestic, dreamy-atmosphere, otherworldly, mystic-elements, surreal, immersive-detail'



## TODO
- [ ] Fix Bugs and make it work on latest ComfyUI
- [ ] Fix Graph Visualizer Node
- [ ] Tweak IF_Assistants and Templates
- [ ] FrontEnd for IF_Assistants and Chat
- [ ] Node and workflow creator
- [ ] two additional Endpoints one API and one Local
- [ ] Add New workflows
- [ ] Image Generation, Text 2 Image, Image to Image, Video Generation## Support
If you find this tool useful, please consider supporting my work by:
- Starring the repository on GitHub: [ComfyUI-IF_AI_tools](https://github.com/if-ai/ComfyUI-IF_AI_tools)
- Subscribing to my YouTube channel: [Impact Frames](https://youtube.com/@impactframes?si=DrBu3tOAC2-YbEvc)
- Follow me on X: [Impact Frames X](https://x.com/impactframesX)
- Supporting me on Ko-fi: [Impact Frames Ko-fi](https://ko-fi.com/impactframes)
- Becoming a patron on Patreon: [Impact Frames Patreon](https://patreon.com/ImpactFrames)
Thank You!