Haoming02 / sd-forge-couple

An Extension for Forge Webui that implements Attention Couple
GNU General Public License v3.0
210 stars 11 forks source link

Alt "{SEP}" method not working as expected (or not at all?) #12

Closed altoiddealer closed 5 months ago

altoiddealer commented 5 months ago

Hello, thanks again for bearing with me on the last issue and helping me get that resolved for API usage.

I've been experimenting with the settings to use an alternate separation (not newlines), and as far as I can tell it just doesn't actually work. Otherwise, I completely misunderstand the intention / usage.

I imagine the reason this setting exists is so users are not required to use new lines in their prompts. Yet, you currently have only 1 example usage of "{SEP}" method... with 5 new lines in it.

author

Are new lines required in all cases, or not? Or am I missing something?


I cannot get a successful generation using an alternate separator method.

SEP SEP2

NOTE: I've tried many different setting combinations, including Global Effect: None


I can only get success with new lines.

newline
ramyma commented 5 months ago

The separator value replaces the new line; you'd use the defined separator text to split each prompt.

Sometimes the seed plays a role, if so, you can try a wider aspect ratio.

image

image

altoiddealer commented 5 months ago

Are you able to use it with a more complex prompt, such as all the other examples? The results you shared looked like results I would get with the extension disabled.

ramyma commented 5 months ago

Works fine, sometimes it depends on the seed an aspect ratio like I mentioned.

image

altoiddealer commented 5 months ago

Thanks for following up.

Honestly, I'm still not convinced that the extension is actually working at all with the {SEP} method.

Have you tried reusing the same seed, but with the extension disabled?

1 2
3 4
ramyma commented 5 months ago

Check the terminal, sometimes there's an error and the extension doesn't do any difference in this case; it fails silently and passes the generation through to the next step.

altoiddealer commented 5 months ago

[Couple] Not Enough Lines in Prompt... [Couple] Not Enough Lines in Prompt... [Couple] Not Enough Lines in Prompt... Forever and ever, unless I do not use the {SEP} method

Same result if I use "None" for Global Effect

Screenshot 2024-04-07 161851
ramyma commented 5 months ago

Try disabling other extensions, make sure you have the latest version of Forge and Forge Couple. It probably would be one of those things.

altoiddealer commented 5 months ago

So, I added print statements in your script and found the following:

If the "separator" value is enclosed in brackets such as {SEP}, the brackets are actually not included in the "separator" value, so it will never find it in the prompt.

The feature actually works - it just can't be enclosed with curly brackets, and maybe some other special characters, idk.

But it definitely does not work with curly brackets.

altoiddealer commented 5 months ago

Alllllrighty, you were correct again!

The Dynamic Prompts extension uses curly brackets for its syntax, so it is apparently stripping them out of the prompt. When I disable the extension, "{SEP}" works.

In any case, values without curly brackets works though.