[bug]: Flag --gui no longer working
Is there an existing issue for this?
- [X] I have searched the existing issues
OS
Windows
GPU
cuda
VRAM
8GB
What happened?
Calling invoke.py --gui gives the following error:
TypeError: FlaskUI.__init__() got an unexpected keyword argument 'start_server'
This seems to be an issue with newer versions of flaskwebgui. Apparently, the start_server argument was renamed to server in commit e023f1c. However, also the idle_interval argument is no longer present in current releases of flaskwebgui.
I noticed that no version of flaskebgui is specified in the environment.yaml (in fact, flaskwebgui is not even included). Adding flaskwebgui==0.3.7 would also solve this issue.
Screenshots
No response
Additional context
No response
Contact Details
No response
You can use the --web flag and access the UI in your browser at http://localhost:9090 - it's essentially the same thing
Previously in #1687, I changed flaskwebui initialization process in order to fix similar issue that happend in InvokeAI that was installed manually using pip. I was not aware with the version difference of flaskwebgui in the requirements file used by pip and conda installers at that time. Hence, the --gui broke in InvokeAI that installed using conda.
I think this issue is easy to fix if the project still want to maintain --gui option. As @dhelonious said, flaskwebgui version needs to be pinned in the requirement files used by conda.
@ebr: I actually like to have a separate window for the UI. I would not mind using the --web flag if there was an option to automatically open the url in my browser. However, I'm also fine if the maintainers decide to drop the --gui flag, as long as there is no longer a broken flag.
Didnt decide to drop it. The library was updated and the new version has a different syntax. I think we didn't pin the version in the installer so it installed the latest version instead of the tested version.
As a temporary fix you can do this. We'll fix this up in the next release.
Go to invoke_ai_web_server.py and find this code and replace it to the one below.
From:
FlaskUI(
app=self.app,
socketio=self.socketio,
start_server="flask-socketio",
width=1600,
height=1000,
idle_interval=10,
port=self.port
).run()
To:
FlaskUI(
app=self.app,
socketio=self.socketio,
server="flask_socketio",
width=1600,
height=1000,
port=self.port
).run()
Thanks, I'll look forward to the update! As a workaround, I downgraded flaskwebgui in my virtual env, so that I do not have to make changes that could be overwritten on git pull.
Thanks, I'll look forward to the update! As a workaround, I downgraded
pywebguiin my virtual env, so that I do not have to make changes that could be overwritten ongit pull.
flaskwebgui .. Not pywebgui
Typo... thanks! I corrected this.
Fixed in 2.2.4