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://ko-fi.com/impactframes
366 stars 27 forks source link

input prompt #46

Closed mvdberk closed 2 weeks ago

mvdberk commented 3 weeks ago

Hi,

Great nodes! I loved it on A111, even more so on Comfy. One question though:

Can we have an input prompt that can be passed through to the IF Prompt to Prompt node? I would like to first build my own prompt using wildcards and feed it into this node to be send to the LLM.

Would this be possible?

Thanks, Mathieu.

if-ai commented 3 weeks ago

Probably, I haven't try that but in theory you can convert the text field as input. You can also edit one of the json assiants to instruct the LLMs what you want to be done with your prompt to have the result you like.

mvdberk commented 3 weeks ago

Thanks for your quick reaction! Glad to hear that maybe it is possible!

How can I convert the text field as input? The IF Prompt to Prompt node has no input. Should I use the context input of the IF Chat Prompt node?

Here's a workflow I edited to have the impactWildcardProcessor node generate a prompt I wish to feed into the LLM: test wildcard llm video.json

if-ai commented 3 weeks ago

You right click on the node and there is convert widget to input option. then you can plug input of text or string type I think

The context input expects and array of embeddings that only works on ollama

mvdberk commented 2 weeks ago

Thanks again for the quick reply! it amazingly works with this simple solution! This is so great. I have all my old prompts in a txtfile, Using wildcards it picks one and since a lot of these prompts also contain wildcards, feeding it to the llm generates amazingly unique images. Great work man! Thanks a lot.

if-ai commented 2 weeks ago

Fantastic! thanks to you for using the nodes remember that you can edit all the presets and assistants since they are json files it can further personalize the prompts to your style or create new things