This project was originally just a proof of concept. With so many new optimization techniques, such as Turbo, this implementation is extremely slow by today's standard...
This is an Unity project that allows you to run the Stable Diffusion pipeline within Unity,
achieved by using ONNX
version of the models and OnnxRuntime
to inference at runtime.
- CUDA Toolkit
- CUDA Deep Neural Network
- ONNX Runtime
as shown in the
Plugins
folder
- This project was built on ONNX Runtime
1.15.1
- Tested on CUDA
v11.6
andv11.8
- Tested on CUDNN
v8.5.0.96
- Tested on CUDA
- Download the models from Release, and put them into the
StreamingAssets
folder. - 2 sample scenes are included:
- One is a simple UI where you can enter any prompt and adjust some settings to generate an image
- Another is a 3D scene where you can generate a skybox and a painting
- Positive Prompt
- Steps
- Euler a sampling method
- CFG Scale
- Inference
fp16
Precision