Skip Navigation

[text-to-image-plugin] prompt of a number breaks the generator

(Sorry if this wasn't the right way of posting this bug. Just let me know how it should be done and I'll remember for next time.)

It appears that it interprets a prompt that is a number as being a number value. I have no idea why. This breaks because it's trying to do some .replace() on the prompt to make a tooltip it seems.

This doesn't just happen in my own app. If you use No Style on AI Image Generator, it errors too.

Numbers this happens for are integers 123, floats 1.23, with or without a negative sign -123. If it's got anything but the above in the prompt, even a space, or a leading zero, it does not bug out. But of course ideally, people wouldn't have to find this workaround to make sure their generator doesn't error-out. (Though I'm sure most people haven't found this problem, so the problem likely would happen to most or all image generators.)

2