vienteck / ComfyUI-Chat-GPT-Integration

GNU General Public License v3.0
29 stars 4 forks source link

Credits to Omar92. This is based heavily off of his code

https://github.com/omar92/ComfyUI-QualityOfLifeSuit_Omar92

I rewrote the core logic because this code was not compaitible with the new version of the OpenAi api

Updates

2//24/2024 -I have updated logic to get to the roles and the config json files to work with Linux and MacOs.

2/21/2024 -I removed the text around the OpenAi response so now the response from chatgpt will go straight into the image generator. This makes roles useless so i will eventually remove that.

1/4/2024 -I removed max_words from the node as it didnt really seem to do anything. You can try inputting it in the prompt to see if that makes a difference.

-Sometimes, for whatever reason, chat-gpt api just doesnt work so i added logic to try 3 times waiting 10 seconds in between each try. This seems to work 100% of the time

-Added a seed so that the prompt can be resubmitted to get a difference response. Make sure that the "control_after_generate" is set to random if you want this. if not you will use the same response the first time you submit a request to chat gpt

ComfyUI-ChatGPTIntegration

Single node to prompt ChatGPT and will return an input for your CLip TEXT Encode Prompt

ComfyUI

ComfyUI is an advanced node-based UI that utilizes Stable Diffusion, allowing you to create customized workflows such as image post-processing or conversions.

How to install

Download the zip file. Extract to ..\ComfyUI\custom_nodes. Restart ComfyUI if it was running (reloading the web is not enough). You will find my nodes under the new group O/....

How to update

The file looks like this :

{ "openAI_API_Key": "sk-#################################" }

ChatGPTPrompt

This node harnesses the power of chatGPT, an advanced language model that can generate detailed image descriptions from a small input.

Contact

Discord: vienteck#6218

GitHub: vienteck (https://github.com/vienteck)