WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.15k stars 170 forks source link

Variables in Text Multiline node #200

Open alessandroperilli opened 1 year ago

alessandroperilli commented 1 year ago

Hi. Amazing suite. Thanks for sharing it with the community.

I'm trying to capture two pieces of information to print them in the terminal and save them in a file:

It would be very helpful if the WAS Save Image node could offer as output the full image name (comprehensive of the progressive number attached to the chosen prefix).

Short of that, it would even more helpful if that name (and the seed) was a variable that can be inserted in the Text Multiline node, so I can concat it to other strings and print it to console with a TTN textDebug node or save it in a file.

I tried to add a variable to the Text Multiline node but it's not rendered. Something like %seed_rgthree.seed% remains as is (where seed_rgthree is the S/R name I gave to the node).

Maybe this way of thinking is incorrect and there's an easier way to fix it. Suggestions are welcome.

Thank you.

WASasquatch commented 1 year ago

Those silly widget tags only work on save image node from vanilla ComfyUI, instead of working on any input anyway. Not sure why it was added with so limited support for anything.

In WAS-NS there are TextTokens you can use to save data that persists between sessions.

I can add filename output to the WAS-NS Save Image.

alessandroperilli commented 1 year ago

@WASasquatch that would be amazing, thank you.

I saw the TextTokens, but I didn't realise that there were nodes available to use them. It would be really cool if Text Add Token by Input node would have an output, too, so I can pass it to concat nodes and other things.

alessandroperilli commented 1 year ago

I figured how to do the second thing:

Screenshot 2023-09-08 at 21 32 21