invoke-ai / InvokeAI

Invoke is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
23.8k stars 2.45k forks source link

fix(ui): load workflow from file #7254

Closed psychedelicious closed 3 weeks ago

psychedelicious commented 3 weeks ago

Summary

In a8de6406c5e12e8fae7a6aef97c4fb606880b67f a change was made to many menus in an effort to improve performance. The menus were made to be lazy, so that they are mounted only while open.

This causes unexpected behaviour when there is some logic in the menu that may need to execute after the user selects a menu item.

In this case, when you click to load a workflow from file, the file picker opens but then the menuitem unmounts, taking the input element and all uploading logic with it. When you select a file, nothing happens because we've nuked the handlers by unmounting everything.

Easy fix - un-lazy-fy the menu.

Related Issues / Discussions

Closes #7240

QA Instructions

Loading workflow from the three-dots menu should work.

Merge Plan

n/a

Checklist