Views
No views yet
python stable_diffusion_xl.py --provider cuda --optimize --use_fp16_fixed_vae1git clone https://github.com/microsoft/onnxruntime
2cd onnxruntime1git lfs install
2git clone https://huggingface.co/tlwu/stable-diffusion-xl-1.0-onnxruntimedocker run --rm -it --gpus all -v $PWD:/workspace nvcr.io/nvidia/pytorch:23.10-py3 /bin/bash1export CUDACXX=/usr/local/cuda-12.2/bin/nvcc
2git config --global --add safe.directory '*'
3sh build.sh --config Release --build_shared_lib --parallel --use_cuda --cuda_version 12.2 \
4 --cuda_home /usr/local/cuda-12.2 --cudnn_home /usr/lib/x86_64-linux-gnu/ --build_wheel --skip_tests \
5 --use_tensorrt --tensorrt_home /usr/src/tensorrt \
6 --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF \
7 --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=80 \
8 --allow_running_as_root
9python3 -m pip install build/Linux/Release/dist/onnxruntime_gpu-*-cp310-cp310-linux_x86_64.whl --force-reinstall1python3 -m pip install --upgrade pip
2cd /workspace/onnxruntime/python/tools/transformers/models/stable_diffusion
3python3 -m pip install -r requirements-cuda12.txt
4python3 -m pip install --upgrade polygraphy onnx-graphsurgeon --extra-index-url https://pypi.ngc.nvidia.com1python3 demo_txt2img_xl.py \
2 "starry night over Golden Gate Bridge by van gogh" \
3 --engine-dir /workspace/stable-diffusion-xl-1.0-onnxruntime