- download any base model for Ex. => sd_xl_base_1.0.safetensors
- if you have any checkpoint model then take it along with base model for Ex. => sdxl-base-10000-000009.safetensors (Lora checkpoint)
- the directory structure will look like this
.
├── builder
│ ├── cache.py
│ ├── clone.sh
│ └── requirements.txt
├── Dockerfile
├── imgs
│ ├── create endpoint.png
│ └── create template.png
├── README.md
├── requesting-script.py
└── src
├── rp_handler.py
└── start.sh
- make changes in files like
Dockerfile
andstart.sh
according to your model names - docker login
- docker build -t alloc7260/sdxlbase1:v12 . # put your username insted of alloc7260
- docker push alloc7260/sdxlbase1:v12 # put your username insted of alloc7260
- go to runpod console
- go to serverless tab
- select custom template
- create custom template using this public docker image
- select endpoints
- create endpoint by specifying created template name and instance details
- get the endpoint id and put it in
requesting-script.py
- get your api key from settings tab and put it in
requesting-script.py
- pip install requests opencv-python numpy Pillow
- tweak the parameters and run the script by
python3 requesting-script.py