Trojaner / text-generation-webui-stable_diffusion

Integrate image generation capabilities to text-generation-webui using Stable Diffusion.
Other
51 stars 5 forks source link

Default Output Trigger Regex seems incorrect #11

Closed TheInvisibleMage closed 9 months ago

TheInvisibleMage commented 9 months ago

Description

The default stable_diffusion-interactive_mode_output_trigger_regex within settings.debug.yaml (currently " .[([](sends|uploads|adds|shows|attaches|generates|here (is|are))\b.+?\b(image|pic(ture)?|photo|snap(shot)?|selfie|meme)(s?)") seems to have an issue: The "[*([]" block appears to be searching for those characters directly, which are unlikely to appear in most output most strings, causing image output to almost always be prevented.

Caveats

Additional Suggestions

Adding "draws|paints|creates" to the first group here would help increase the chances of image production when it would make sense to occur.

Why not just make a PR?

I want to confirm what the intended behavior of that block is before I go about pulling it out.

TheInvisibleMage commented 9 months ago

Oddly enough, reviewing my message has given me an indication; The "[*([]" block appears to be used to hide text, presumably to hide the SD prompts from the user. Will close this issue; the regex is likely fine, and the lack of hidden SD prompts coming through is a separate issue.

Trojaner commented 9 months ago

The [*([] block is used to specify that the message should start with a *, ( or [ as the models I use often generate messages such as: *Sends an image of ...*.

Regex-wise, it just a simple [xyz]-style character group containing these symbols. You can make this optional by appending a ? at the end of it, like this: [*([]?

It makes sense to remove this block (or make it optional) and append the draws|paints|creates keywords, so I am reopening the issue.