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
368 stars 27 forks source link

Image Input #3

Closed Mossbraker closed 3 months ago

Mossbraker commented 3 months ago

Could you possibly have an alt version of the IF Image to Prompt node that has an input for an image or image batch? Currently, if you convert the 'image' widget to an input, it doesn't accept images to the input as it is combo type.

I tried to do this myself, but always unsuccessfully as I don't know what I'm doing. Initial error was that pic had 4 dimensions, but should be 2/3 dimensional, so I used squeeze to remove what I think was the batch dimension. Tried to manipulate that a few different ways before doing b64encode, but I always got "Failed to fetch response, status code: 400" which also prints the response "Failed to fetch response from Ollama."

An updated node, or a suggestion to help me figure the rest out myself, would be greatly appreciated.

if-ai commented 3 months ago

I am working on adding batch images I see if can add alternative inputs too. I will reply with the update here

if-ai commented 3 months ago

I added the input image