ssube / onnx-web

web UI for GPU-accelerated ONNX pipelines like Stable Diffusion, even on Windows and AMD
https://discord.gg/7CdQmutGuw
MIT License
201 stars 26 forks source link

setup-*.bat broken #378

Closed holgerpieta closed 9 months ago

holgerpieta commented 1 year ago

The setup-*.bat files in api/ just call onnx_env\Scripts\activate.bat in line 2, which will terminate the script after calling the activate script. Instead they must call the activate script, e.g. like this call onnx_env\Scripts\activate.bat to continue and perform the following commands.

Also the setup guide for Windows is somewhat incomplete, as it does not mention that the setup-*.bat files can be found in api/.

holgerpieta commented 1 year ago

Uhm, it generally seems like the Windows Python installer is broken and/or incomplete. The launch.bat is lacking the call to activate.bat, so it doesn't work at all. After fixing that, it starts and the server is reachable, but when accessing 127.0.0.1:5000 in the browser I just get a 404, so something isn't working, but I don't know what.

ssube commented 1 year ago

When you say Windows Python installer, which method is that? Using a pre-installed Python on Windows, or the Windows bundle, or something else?

I will fix the calls in the launch scripts, and have some work to do on the docs before the next release (#368, #328), so I will make sure to mention the setup files.

If you are running the API server from a clone of the repo, you may need to build or download the GUI files as well. You can grab a copy from the gh-pages branch: https://github.com/ssube/onnx-web/tree/gh-pages/v0.10.0

The Windows bundle comes with the GUI files, but if you cloned the repo, they will be missing. Download (or build and copy) them into https://github.com/ssube/onnx-web/tree/main/api/gui, and that should work.

ssube commented 10 months ago

There were at least two parts to this, and I believe both are now fixed:

I was hoping to add the GUI download to the launch script, but it looks like that might only work reliably within powershell (https://stackoverflow.com/questions/4619088/windows-batch-file-file-download-from-a-url), so that's covered in the setup documentation for now.

ssube commented 9 months ago

The launch.bat script now has a check for the web UI files and the launch.ps1 script will check for and download them if they are not found.