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

Meaning of "profile" and "temperature" #29

Closed karl-von-knecht closed 1 month ago

karl-von-knecht commented 1 month ago

Hi IF-AI, thanks for your nodes, they work great for me. I am curious what the profile and temperature parameters do, can you please explain? Thank you for your kindness!

if-ai commented 1 month ago

Hi, Thank you. The profile soon to be named (assistant) is kind of a system prompt or template for the LLM to control it's behaviour. I am working to improve this node and making it into something that can be an assistant for your workflows in comfy for a wide range of scenarios. Still a long way to go. But the idea is to steer the model to be more specific to your use case. The profiles are json files so you can create your own assistants. The Temperature is a parameter to control how creative and coherent you want your response, if the responses are too wild you can lower this number normally it goes from 0 - 2 a number closer to zero like 0.2 will give a very strict and repetitive output 0.5-0.7 is a good number to get creativity and avoid repetitiveness you can go over one like 1.2 but depends on the models some have different thresholds and can make the response incoherent to your request. This numbers are base on LLama models but even a finetune can skew the numbers so you have to play a little to find the best settings.

karl-von-knecht commented 1 month ago

Great explanation, thanks! You might consider adding this information to the Usage instructions where people are more likely to find it than buried here in Issues.

if-ai commented 1 month ago

I am preparing some updates and will make a better docs for the nodes soon after the update. Since things are like in a WIP phase atm. Thanks for the suggestion

if-ai commented 1 month ago

I added a help Instructions guide Note in the latest workflow