Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Had some trouble installing the self-hosting version, but now it works and it is awesome! #6

Open
vatavian opened this issue Mar 11, 2024 · 1 comment

Comments

@vatavian
Copy link
Collaborator

vatavian commented Mar 11, 2024

New instructions for installing the backend on your own computer (self-hosting):

Clone the repository or download as .zip and extract.
Download the generator weights from https://drive.google.com/file/d/1qmxUEKADkEM4iYLp1fpPLLKnfZ6tcF-t/view?usp=sharing and move it into the Backend/networks folder.

In the Backend folder, open a command prompt, and run:

pip install -r requirements.txt

See the instructions in the comments in Backend/requirements.txt to install PyTorch, then continue below.

Run the following two commands in the Backend folder to generate your own self-signed key (needed for using https). You can safely just press Enter to accept the default value for all questions:

openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr
openssl x509 -req -days 730 -in server.csr -signkey server.key -out server.crt

Now you have a choice to make between the original batch backend and the new streaming backend.

  1. The original backend works with Manganelo and colors a chapter as a batch. It is used by Frontend-Chrome and Frontend-Firefox. If you are going to use this and you do not have a GPU, edit app.py and set self.gpu = False (~Line 75).
    Launch the original backend with the command: python app.py

  2. The new backend works with more sites and streams one image at a time between the front and back ends. It is used by Frontend-Chrome-AnySite, Frontend-Firefox-AnySite, and Frontend-Safari. Launch the streaming backend with the command: python app-stream.py

Whichever backend you started should run on localhost (https://127.0.0.1:5000/) and Private IP (https://x.x.x.x:5000/)

You will need to enter the Private IP into whichever frontend you use. You should be able to use a frontend on the same computer or on any device on the same local network.

After setting this up for the first time, you will only need to do the last step of opening a command prompt in the Backend folder and using the python command to start the backend each time you want to use it. Make sure your frontend gets the right Private IP each time! Many home routers will give your computer a slightly different private IP address each time it restarts.

@BinitDOX
Copy link
Owner

Thank you so much for documenting these issues! It will be incredibly helpful for others following the self-hosting instructions.

I personally only use the Kaggle hosting, so I can close my PC after hosting it and use it on phone. Therefore, I never updated this self-hosting method. I'll surely add this issue link in the readme.

I'm GLaD you like it! The main colorizer model was created/trained by:
https://github.com/qweasdd/manga-colorization-v2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants