InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Textual Inversion error "Height of False allocated. Not enough space allowed for <npyscreen.wgselectone.SelectOne object"

Open slipperybeluga opened this issue 1 year ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

OS

Linux

GPU

cuda

VRAM

12GB

What version did you experience this issue on?

InvokeAI 2.3.5.post2

What happened?

Unable to use Textual Inversion. The following error message is displayed when I select option 3 Textual Inversion in the startup menu:

An error has occurred: Height of False allocated. Not enough space allowed for <npyscreen.wgselectone.SelectOne object at 0x7f92ca5f62c0>

Textual Inversion was working fine previously, as recently as last week. I can't think of any reason for this error to occur. I deleted all recently downloaded models as those were the only changes to anything in the invokeai file structure. This, as expected, did not solve the issue.

Screenshots

No response

Additional context

Temporary Solution

In case anyone else has this issue, here's how I resolved it.

I edited the textual_inversion.py file located in ./.venv/lib/python3.10/site-packages/ldm/invoke/training directory.

I updated

self.model = self.add_widget_intelligent( npyscreen.TitleSelectOne, name="Model Name:", values=self.model_names, value=default, max_height=len(self.model_names) + 1, scroll_exit=True )

to

self.model = self.add_widget_intelligent( npyscreen.TitleSelectOne, name="Model Name:", values=self.model_names, value=default, max_height=4, scroll_exit=True, )

I don't know anything about numpy widgets, but I noticed other entries in the textual_inversion.py that had npyscreen.TitleSelectOne all had a max height of 4. I can now enter the Textual Inversion menu and have successfully trained a model.

Contact Details

No response

slipperybeluga avatar Jun 03 '23 06:06 slipperybeluga