Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Priority Boost for the other nodes #180

Closed
DrJKL opened this issue Apr 5, 2024 · 10 comments
Closed

[FR] Priority Boost for the other nodes #180

DrJKL opened this issue Apr 5, 2024 · 10 comments

Comments

@DrJKL
Copy link

DrJKL commented Apr 5, 2024

I just hit a case where I'd want to have 2 Prompt anywhere nodes of the same type, but have one only function when the other is muted.

@JorgeR81
Copy link

JorgeR81 commented Apr 6, 2024

That's not strictly necessary for the use cases I had, but I think it would be much more convenient. 

Usually I have a single sequence of groups that use conditioning. 
The first one is the "Main prompt" group which uses the [ Prompts Everywhere ] node.
All the other groups, which can be muted, use 2 [ UE? ] nodes for positive and negative, with increasing priority.
But, I have to write down all the following group names, in that sequence, for each stage, in addition to changing the priority level for both UE? nodes.
 
If [ Prompts Everywhere ] had priority levels, I think it could be used at all stages, for this use case.

But I think [ Prompts everywhere ] currently has a baseline priority of 5 and [ UE? ] a priority of 10.
#168 (comment)

These baseline weights would need to be changed, to allow 9 extra priority levels for each node, and to keep the same priority hierarchy for each type of node, e.g.:

UE? -- 30 ( + 9 )
Prompts -- 20 ( + 9 )
UE -- 10 ( + 9 )
UE3 -- 0 ( + 9 )

conditioning

@chrisgoringe
Copy link
Owner

I think UE? and prompt everywhere could have the same base priority.

@JorgeR81
Copy link

JorgeR81 commented Apr 6, 2024

Yes, 40 different levels is probably too over the top ...
And the [ PE ] nodes would replace [ UE? ] nodes, in this use case

@JorgeR81
Copy link

JorgeR81 commented Apr 6, 2024

On second thought, this feature may not be applicable to the use case I described, afterall.

Because the higher priority groups cannot be allowed to send to the previous groups ("stages") in the sequence, like Prompt Everywhere would do.
Right now, I just delete the group names of the previous "stages", in the group regex of each UE? node, ( until the last UE? in the sequence, which only has 1 more option to send ).

So I still follow the same thumb rule of UE node types: when I increase priority, I also need to increase specificity.

But this still may be worth doing, as it could be useful in other situations.


@DrJKL, how would you use this feature exactly?

Do you just want to switch between 2 groups with [ Prompt Everywhere ] nodes ?

In that case you could put the 2 groups in another [ Fast Groups Muter ] node, and set [ toggleRestriction ] to "max one".
This way, when you enable one group, all the others groups in the node would be muted automatically.

( I have this set for InstantID and Face ID, as an example, but I actually like to use them together ... )

rg3

@DrJKL
Copy link
Author

DrJKL commented Apr 6, 2024

I was testing a few different conditioning nodes (smZ, blenderneko's, efficiency's built-in) and wanted to use the fast groups muter with always one.
I also used a comfyroll switch for a minute, but it only supports 2 at a time and I didn't want to wire up the logic nodes to extend that...

@JorgeR81
Copy link

JorgeR81 commented Apr 6, 2024

Try this workflow. 
Is this what you're trying to do?
I don't think you need to change priorities on [ Prompts Everywhere ] to do this.

I also made a version with WAS nodes, to be completely wireless !


PS:
About the conditioning, I think you'll only see differences, in the A1111 mode, if you use weight values in front of the words.
I tested this a while back and the smZ nodes seemed to be closer to the native A1111, in more complex prompts.

And if you really want to replicate A1111 images, you need to use this KSampler from the Inspire Pack.

inspire


workflow_conditioning

Workflow version with WAS nodes:

workflow_conditioning_was

@JorgeR81
Copy link

JorgeR81 commented Apr 6, 2024

@chrisgoringe, by the way, there is a minor issue related to the UE? autocomplete widgets: they don't show up in the workflow image, as you can see in the second workflow, with the WAS nodes.
That doesn't bother me, but you may want to open an issue for that.

@DrJKL
Copy link
Author

DrJKL commented Apr 6, 2024

Yeah, I just had a default that was outside of any of the groups that I wanted to have be the lowest priority and that's when I noticed that only the AE? nodes had priority boost.

I was using the Inspire KSampler, but I was also seeing if I could replicate its behavior with the Efficiency Noise Control script to see if I could use it alongside the XY Plot. Unfortunately, Efficiency Nodes' scripts don't play as well with other nodes when you're not using their loader's conditioning otherwise.

@JorgeR81
Copy link

JorgeR81 commented Apr 6, 2024

So the use case would be basically the same workflow, but the default conditioning group would have lower priority, so it does not have to be muted.

That could work, but I think the 9 priority levels we have for the EU? nodes may be overkill for this ... 

And once you have this set up, it's very easy to just include the default conditioning group, in the Fast Groups Muter.
Actually, I included all groups at once, just by typing the shared title string "conditioning" in the [ matchTitle ] property.
This would be easier than increasing the priority level of all [ Prompts Everywhere ] nodes, on the other groups.

But, if you guys think this is useful, maybe we could have 1 extra boost level, for non UE? nodes.
I just think that having 9 levels, without a clear use case, would be confusing for new users.

This would allow us to keep the same baseline weights in the code, and keep the priority hierarchy between node types, e.g.:

UE? -- 10 ( +9 )
Prompts -- 5 ( +1 )
UE -- 2 ( +1 )
UE3 -- 0 ( +1 )

rg3a


@DrJKL, About XY plots, I haven't tried the Efficiency Nodes, but the Trung0246 nodes can do very complex plots.

The latest example workflow, with some new nodes, is not working for me, but the first one here works.

Trung0246/ComfyUI-0246#15

@DrJKL
Copy link
Author

DrJKL commented Apr 7, 2024

That does look super powerful, but not quite as clean as
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants