Skip to content

Instantly share code, notes, and snippets.

View monorimet's full-sized avatar

Ean Garvey monorimet

  • Austin, TX
View GitHub Profile
# First, you need an access token for the nod-ai/sdxl-scripts repo. If you are on a secure system, you can add this via the CLI, or you can temporarily edit this file to hardcode it. Just make sure you don't leak your PAT.
# Build with `docker build . -t sdxl-turbine --build-arg DOCKER_USERID=$(id -u) --build-arg DOCKER_GROUPID=$(id -g) --file ./ubuntu_rocm_sdxl_python.dockerfile`
# Run with `docker run -it --rm --network=host --device=/dev/kfd --device=/dev/dri --group-add video --group-add $(getent group render | cut -d: -f3) --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v /path/to/downloaded/sdxl/weights:/weights -v /path/to/generated_imgs/:/gen_imgs sdxl-turbine'
# To benchmark inside docker: `./benchmark-txt2img.sh N /weights`
# To run python txt2img: `./run-txt2img-python.sh <prompt> <negative_prompt> <batch_count> <device_num> /weights`
FROM rocm/dev-ubuntu-22.04
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
@monorimet
monorimet / SDXL_iree_main.txt
Last active April 30, 2024 02:41
SDXL Docker instructions
For benchmarking, you can use this dockerfile:
https://raw.githubusercontent.com/monorimet/sdxl-scripts/main/docker/ubuntu_rocm_turbine.dockerfile
And weights are available here:
https://sharkpublic.blob.core.windows.net/sharkpublic/SDXL/SDXL_weights_fp16/shark-sdxl-weights.tgz
you can wget that .tgz and extract its contents to some /path/to/your/weights.