
Please register for RunPod at: https://runpod.io?ref=1aka98lq

Example tutorial for learn how to install and use RunPod

(starts at 22:03) : https://youtu.be/KW-MHmoNcqo?si=QN8X8Sjn13ZYu-EU&t=1323

Select a GPU with a minimum of 24 GB VRAM, such as the RTX 3090.

Choose a RunPod template:

RunPod Pytorch 2.2.0
runpod/pytorch:2.2.0-py3.10-cuda12.1.1-devel-ubuntu22.04

Edit the pod configuration:
Set the volume disk size to 50 GB or your preferred size according to number of models you want to download or such.

Add HTTP port 7861 to the exposed ports list to enable proxy connection.
By default, it will start with the --share option for Gradio sharing.

Upload all files to the workspace folder.

To install, run the following commands:

export HF_HOME="/workspace"
chmod +x Runpod_Install.sh
./Runpod_Install.sh

To use after installation:

Open a new terminal and run the following code each time you start:


cd /workspace/BiRefNet
export HF_HOME="/workspace"
export PYTHONWARNINGS="ignore"
export CUDA_VISIBLE_DEVICES=0
source venv/bin/activate
python App_HQ.py --share

To run the older app use App.py run at above line

You will receive a Gradio live link, and you'll be able to connect via the proxy on port 7861.

Pay attention to the Gradio share link among the printed messages.

Remove the --share option if you don't want the Gradio live link

If you rent multiple GPU machine, you can start different instances on each GPU by changing export CUDA_VISIBLE_DEVICES=1 2 3 4 etc
