diffusers
diffusers copied to clipboard
Remove spaces, parens and numbers from prompts only when trailing
Initially reported here https://github.com/TheLastBen/fast-stable-diffusion/issues/1174#issuecomment-1366085743
This keeps dashes, for things words like x-men, t-shirt, or wanting a trigger like wa-vy or mdjrny-v4 style (real high profile examples).
It also preserves numbers unless they are at the end. For prompts like analog style 1970's bar or, again, mdjrny-v4 style
I see absolutely no downside to this over the current state, except for people expecting those to get trimmed, which I don't see as being frequent or useful. The current solution also leaves dup spaces when wiping numbers, dashes, etc.