mrhan1993 / FooocusAPI

Fooocus with fastapi
https://mrhan1993.github.io/docs
GNU General Public License v3.0
17 stars 4 forks source link

[Bug]: Poor install instructions #32

Open reaperhammer opened 1 month ago

reaperhammer commented 1 month ago

Checklist

What happened?

Why are the install instructions so vague? How to install this alongside an existing Fooocus instance?

Steps to reproduce the problem

read the Install instructions, https://github.com/mrhan1993/FooocusAPI#install

What should have happened?

The install instructions should be clearer on how to add the FooocusAPI alongside an existing Fooocus instance.

What browsers do you use to access Fooocus?

Google Chrome

Where are you running Fooocus?

Locally

What operating system are you using?

Windows 11

Console logs

N/A

Additional information

N/A

mrhan1993 commented 1 month ago

Thank you for your suggestion, I will improve the documentation. By the way, your question is actually very simple. You can install FooocusAPI just like you install Fooocus, and the startup is the same. For example, using python launch.py will start both webui and api at the same time. You can access webui at http://localhost:7865 and access the API at http://localhost:7866. My goal in refactoring this project is to make the API a part of Fooocus, which means that the usage and functionality of Fooocus are completely consistent with the main repository, just with the addition of the API. I hope this can answer your question

reaperhammer commented 1 month ago

Can I just grab a release from this project and extract the zip overwriting the same files in my already working Fooocus directory?

mrhan1993 commented 1 month ago

Can I just grab a release from this project and extract the zip overwriting the same files in my already working Fooocus directory?

I did a simple test, and it's okay. But I still recommend that you back up your existing Fooocus before proceeding

LeFanch commented 1 month ago

I was able to install FooocusAPI on Windows but the Fooocus documentation is not complete for Windows users : it gives a "handy" 7z file, but doesn't explain how to achieve an installation with pip+virtualenv. So for FooocusAPI, on Windows, you have to use the Fooocus Linux documentation, although it installs the wrong PyTorch version...

fullstackwebdev commented 1 month ago

Thank you for your suggestion, I will improve the documentation. By the way, your question is actually very simple. You can install FooocusAPI just like you install Fooocus, and the startup is the same. For example, using python launch.py will start both webui and api at the same time. You can access webui at http://localhost:7865 and access the API at http://localhost:7866. My goal in refactoring this project is to make the API a part of Fooocus, which means that the usage and functionality of Fooocus are completely consistent with the main repository, just with the addition of the API. I hope this can answer your question

how do you use the API in docker? 7866 isn't enabled, and the web server doesn't respond to api calls only displasy the webui.

mrhan1993 commented 1 month ago

@fullstackwebdev

Try this;

docker pull ghcr.io/mrhan1993/fooocusapi:2.5.3

cd FooocusAPI

docker run --rm --gpus all --name fooocusapi -v $(pwd):/content/app -p 7865:7865 -p 7866:7866 ghcr.io/mrhan1993/fooocusapi:2.5.3