diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Remove spaces, parens and numbers from prompts only when trailing

Open flesler opened this issue 3 years ago • 0 comments

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.

flesler avatar Jan 02 '23 22:01 flesler