lks-ai / anynode

A Node for ComfyUI that does what you ask it to do
MIT License
426 stars 27 forks source link

Something wrong about output, can not get the right string #20

Open EricoZhao opened 3 weeks ago

EricoZhao commented 3 weeks ago

Error: sequence item 0: expected str instance, list found

Snipaste_2024-06-06_16-53-28

Snipaste_2024-06-06_16-48-58

EricoZhao commented 3 weeks ago

It is also wrong to directly pass text into clip. Error: 'list' object has no attribute 'replace'

Snipaste_2024-06-06_17-03-51

Snipaste_2024-06-06_17-00-09

tetsuoo-online commented 3 weeks ago

I'm going to follow this post because I'm tired to even try making mine. It's called Anynode but any input or output failed. Every single workflow in the list failed, I feel more tired just thinking about it

EricoZhao commented 3 weeks ago

I'm going to follow this post because I'm tired to even try making mine. It's called Anynode but any input or output failed. Every single workflow in the list failed, I feel more tired just thinking about it

Snipaste_2024-06-07_15-00-05

Maybe it would be a perfect match with omost, now, for text

lks-ai commented 3 weeks ago

I'm going to leave this one open because this is definitely a bug that others face.

So, Could you give me the prompts you guys are using? I can't read it on your screenshots because they don't have enough resolution to read the small prompt text in the AnyNodes you are showing. Just paste the prompt text here please.

We will get this resolved, it seems to be simply that you are trying to feed the wrong input to the string list output... It will only either expect the type: string or list. I don't know because I haven't used that one but here are some tips for getting the right output format for other nodes.

From what I can tell, you guys are having a mixup between what the input type actually is and what the output type is but I can't tell because I can't read your prompts. It also seems you are trying to use AnyNode as if it were directly an LLM. If you make this misconception of AnyNode's place in your workflow, you will have problems with the output from your function being bad quality if it works at all.

Where does AnyNode fit in Text Processing?

Try to think of AnyNode as a "python coder that makes you a function". It is not directly taking your input text and using an LLM to process that text. It is taking the "type" of your input and making a function in python that handles it. If you try to use it assuming that it will behave like other LLM nodes, it will not work. Other LLM nodes can perform AI text manipulation, AnyNode can perform these functions, but only if you asked it to make you a function which uses these AI tools to perform the text manipulation.

Any tool has it's limitations. You can try to use a hammer to beat a screw into the wall, but it will not work the way you expected if you had just used a screwdriver.

image In this Image: someone trying to use AnyNode as if it were Llava Captioner... doesn't work

What you should try to use other LLM Nodes For

Again, you can try to get AnyNode to do things that you can do through the generative AI apis. Think about your problem like you are talking to a python developer, asking them to make you an app. You are not directly asking the LLM to do anything beyond making that function. If you want it to do something with Generative AI you have to ask it to use openai in the function it is generating. How would a developer know which service you were trying to use to perform the above advanced capabilities?

Goal of AnyNode

The goal of AnyNode is to provide you the right tool in the right place in your workflow. It is not to replace every other node. I am not trying to beat out the other nodes, and I respect other node developers. I want it to assist you, not replace everything else.

Stuck? Try Using a Tool Built for your Task

There is a very large node ecosystem. Think about the work people put into their nodes developing them. Think about how tested their nodes are, and how precise they are. Think of all the feedback their nodes got from users to help their node get better. Those devs make amazing nodes that do things which you are trying to do. Why would you ask a junior dev to try to build that for you in one node with two inputs? I never said AnyNode doesn't have limits, I just said I don't really know where they are. I never said AnyNode replaces every node with just a "turn of phrase". You are asking a "genie" to know the hidden desires behind your wishes... but it's a genie, you have to be very specific of what you ask for, or it will try to grant your wish the best it knows how, and that might not be what you really want. image

I hope this helps clear things up. Let me know if you have any questions. I will leave this thread open.

EricoZhao commented 3 weeks ago

this is my prompt in the AnyNodes: "Get the keywords in the input and pass them to the output".

and i found this error the following(maybe is useful): Snipaste_2024-06-11_09-14-56


!!! and i get the right method to use AnyNodes —— you must as much as possible to clearly described the [input] and the [output], something like: you can tell AnyNodes what type from [input] and you want [output] what type is.


it's cool this Node, i hope this will be more strong!