InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: A fraction number in prompt causes black image

Open Barafu opened this issue 3 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Windows

GPU

cuda

VRAM

8

What happened?

If a prompt contains a fractional number, the whole rendering process produces a black image. Integer numbers cause no problems. If having a fractional number in the prompt is a syntax error, it should be caught before generation - think of poor souls who generate 30 minutes per picture only to find out they accidentally got a number into the prompt.

web 20 image

web 2.0 image

web 2/0 image

Screenshots

No response

Additional context

No response

Contact Details

No response

Barafu avatar Jan 23 '23 13:01 Barafu

isnt that because Invokeai is trying to parse the prompt for certain ast-format? such as: (subject:1.1)

TheBarret avatar Jan 28 '23 10:01 TheBarret

The problem is in the way numeric attention values are parsed in the prompt: 2.0 is interpreted as 2 with a weight of .0, which is most likely a bug.

This happens similarly for any words in the prompt that end with a decimal point (.) followed by some digits, such as f/2.8, which is parsed as f/2 with a weight of .8.

Intentional use of numeric attention values following words are parsed incorrectly as well. The prompt intricate1.5 is parsed as intricate1 with a weight of .5.

My suggestion would be to change the prompt syntax specification to only allow numeric weights after parentheses to avoid these issues.

noodlebox avatar Feb 16 '23 00:02 noodlebox

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Mar 12 '23 06:03 github-actions[bot]

The issue still exists.

Barafu avatar Mar 19 '23 08:03 Barafu

There has been no activity in this issue for 14 days. If this issue is still being experienced, please reply with an updated confirmation that the issue is still being experienced with the latest release.

github-actions[bot] avatar Apr 04 '23 06:04 github-actions[bot]

Bump, you bot.

Barafu avatar Apr 04 '23 09:04 Barafu

This is fixed, thanks!

Barafu avatar May 12 '23 19:05 Barafu