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

Unexpected behavior with concat and Encode++ node #51

Open
Spiderbrigade opened this issue Jan 21, 2024 · 3 comments
Open

Unexpected behavior with concat and Encode++ node #51

Spiderbrigade opened this issue Jan 21, 2024 · 3 comments

Comments

@Spiderbrigade
Copy link

Spiderbrigade commented Jan 21, 2024

First thank you for this node. I have so many use cases that only work by "steering" the prompt between keywords in A1111 so it's great to be able to use that in Comfy.

I'm noticing that if any Concat nodes are involved in a workflow that touch the Encode++ node, the A1111 prompt editing and alternating words syntax only functions in the first concatenated node. For instance, using a [fox|cat|bear|owl] in a meadow, I normally get a weird hybrid creature as expected. But I want to use more complex prompt construction. So I've tried introducing concat nodes a few different ways:

  • concat text, then feeding the combined text into the Encode++ node
  • several Encode++ nodes, and Concat Conditioning

In both cases, the prompt editing works if it's in the first slot of the concat, but doesn't work if it's in the second slot. Inspecting the output of the concat node looks identical in both cases.

I'm sure this is due to something going on behind the scenes that I don't understand (like how the sampling step is passed back to the prompt...?) so 100% understood if it's not a solvable problem. But thought I'd bring it up just in case.

@shiimizu
Copy link
Owner

shiimizu commented Feb 7, 2024

The ConditioningConcat and ConditioningAverage nodes only apply to the first conditioning for some reason, and prompt editing returns multiple conditionings. Multiple conditionings outputted from the ConditioningCombine node would also go through the same behaviour.

I think it should be fixed upstream, but in the meantime you can use BREAK in the Encode++ node to essentially apply ConditioningConcat to all the conditionings in a prompt editing prompt.

@Spiderbrigade
Copy link
Author

Hmm, interesting! Does that also explain the same issues with concat text? I sort of see how the multiple conditionings created by prompt editing (is it one for each step?) could interact that way with other nodes that handle conditionings, but on the text concat it seems like having:
a [fox|cat|bear] in a [forest:meadow:0.5] in the Encode++
should be the same as:
a [fox|cat|bear] and in a [forest:meadow:0.5] combined by one of the multiple text/string concat nodes and passed into Encode++
but the second one applies only the first edited prompt with the second stuck on forest. If I reverse the two, it transitions from forest to meadow but the animal is 100% fox.
Thanks again for taking the time to look at it.

@shiimizu
Copy link
Owner

Oh I see. Thanks for pointing this out. It should be fixed now.

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

2 participants