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

Remove space at the start of response #43

Open GeekyGhost opened 1 month ago

GeekyGhost commented 1 month ago

You wouldn't know how to remove the space from in front of response that gets added by default would you? I'm trying to pass true and false to a boolean to use as an automated type of switch, but I need to remove the space from in front of the response output. It works without the space, but with the output automatically adding it, it messes it up lol.

Screenshot 2024-05-26 100040
GeekyGhost commented 1 month ago

This is all that's holding me up lol.

Screenshot 2024-05-26 120124
if-ai commented 3 weeks ago

I apologize that I haven't got back to you to fix this easy issue. I was working on a new version of the node and making sure this was fix in various places but I couldn't push it due to an unforseen issue on how comfy works. Just to double check is possible the model itself has a empty space on the model file template in ollama this is an error they made when creating the template file and almost everyone copied it so it could be that too. Other than that I will inspect the current node to find where the problem is I am already applying some regex and strip to the responses so is weird it still comes like this

GeekyGhost commented 3 weeks ago

I apologize that I haven't got back to you to fix this easy issue. I was working on a new version of the node and making sure this was fix in various places but I couldn't push it due to an unforseen issue on how comfy works. Just to double check is possible the model itself has a empty space on the model file template in ollama this is an error they made when creating the template file and almost everyone copied it so it could be that too. Other than that I will inspect the current node to find where the problem is I am already applying some regex and strip to the responses so is weird it still comes like this

No worries, completely understand. I got a bit caught up in my spritesheet maker which is way less intensive lol. I may have to add a node to format the text worst case scenario because it may just baked into the model like you said.