
Jurdn's ComfyUI Groq API Prompt Enhancer
Hello all! I'd like to introduce this small node that I've made for LLM-based prompt enhancement that utilizes the Groq API.
What is Groq?
Not to be confused with Grok, which is Twitter/X's LLM, Groq (found at https://www.groq.com) is a service that provides fast LLM inference through their LPU hardware. To promote their insanely capable hardware, their service is free with much higher limitations than most popular free AI service tiers. And while most AI LLM services require subscriptions to access API features, groq offers them for free (within reasonable limits... at least for now...).
So how does the node work?
This node utilizes the Groq API in order to facilitate Prompt Enhancement through the selection of open source models that Groq offers. Simply type in a simple prompt, get an elaborate/enhanced prompt based on your provided system prompt (or the default system prompt included with the node)
NOTE: LLAMA 3.3 KNOWS BOORU TAGS. If you would like to use this for booru tag prompting, switch the model used and adapt the system prompt to comma-separated list booru tags instead.
How do I change the default system prompt and model?
In your ComfyUI folder, you will find a sub-directory called "custom_nodes". In the custom_nodes directory, you will find the folder for this Node, titled "Comfyui-Jurdns-groq-node" (if properly installed). Inside of this folder will be file called "groq_config.json". In this file you must place your API key found or generated here: https://console.groq.com/keys. You can then replace the model here with the name of the model you would like to use based on the list of models available on groq, found here: https://console.groq.com/docs/models. The default system prompt can either be altered here, or can be temporarily overwritten on a per-workflow basis by editing the "system prompt overwrite" textbox on the node itself.
For additional information, please check the readme.md on the github repo.
INSTALLATION INSTRUCTIONS:
If you already have ComfyUI Manager installed, you can search "Jurdn" or "Groq" on comfy manager to locate and install this custom node.
Manual Installation
Clone the github repo into your custom_nodes folder.
To do this, you will need git installed, and to navigate to your "ComfyUI > custom_nodes" directory, and open a terminal (command prompt) by right clicking the background of the directory and selecting "Open in Terminal".
Then use this command to install the custom node:
git install https://github.com/jurdnisglobby/ComfyUI-Jurdns-Groq-Node.git
(once installed, you can place your API key and alter system prompt/model selections in the 'groq_config.json' file)
Alternatively, a .zip folder containing the node will be uploaded to this page. Make sure the contents of this zip file are placed in ComfyUI > custom_nodes > ComfyUI-Jurdns-Groq-Node
An example workflow using the node will also be included in the custom node folder (within the archive).
Example of the node working:
描述:
训练词语:
名称: jurdnsComfyUIGroq_v10.zip
大小 (KB): 48
类型: Archive
Pickle 扫描结果: Success
Pickle 扫描信息: No Pickle imports
病毒扫描结果: Success