Skip to content

alloc7260/runpod-serverless-stable-diffusion-custom-endpoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. download any base model for Ex. => sd_xl_base_1.0.safetensors
  2. if you have any checkpoint model then take it along with base model for Ex. => sdxl-base-10000-000009.safetensors (Lora checkpoint)
  3. 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
  1. make changes in files like Dockerfile and start.sh according to your model names
  2. docker login
  3. docker build -t alloc7260/sdxlbase1:v12 . # put your username insted of alloc7260
  4. docker push alloc7260/sdxlbase1:v12 # put your username insted of alloc7260
  5. go to runpod console
  6. go to serverless tab
  7. select custom template
  8. create custom template using this public docker image Custom Template
  9. select endpoints
  10. create endpoint by specifying created template name and instance details Custom Endpoint
  11. get the endpoint id and put it in requesting-script.py
  12. get your api key from settings tab and put it in requesting-script.py
  13. pip install requests opencv-python numpy Pillow
  14. tweak the parameters and run the script by python3 requesting-script.py