BlenderNeko / ComfyUI_Cutoff

cutoff implementation for ComfyUI
GNU General Public License v3.0
347 stars 21 forks source link

Is there an advantage to separating into a ClipSetRegion node instead of using an all-in-one prompt? #1

Closed ltdrdata closed 1 year ago

ltdrdata commented 1 year ago

The current implementation requires users to create a ClipSetRegion nodes for each item. How about unifying everything into a ClipRegionBasePrompt based on regex?

By unifying the node, it would only require a prompt input and a target token string input. We could also omit ClipRegionsToConditioning. This way would be much more convenient for the user.

BlenderNeko commented 1 year ago

When you look at the structure of the node tree there are no meaningful choices between the BasePrompt node and the RegionsToConditioning node, so in that regard yeah you could technically unify the whole thing under a single node. The issue I ran into with that approach is that that node will become quite bulky and complex if you want to give users the same level of control.

What might maybe be a nice approach is to let users sacrifice control for simplicity in their node tree as an alternative. So if they want or need fine grained control they can use the current system, but if that's not required they can reduce the number of nodes by using this alternative workflow. With that goal in mind, maybe a nice change to make would be to allow users to set multiple regions at once in the CLipSetRegion node by using line breaks as separators. You lose fine grained control over the target words in all the regions, and the weights of all the regions, but only need a single ClipSetRegion node. The moment you do need more control you can then simply separate that region out into its own ClipSetRegion node.