cassiebreviu / StableDiffusion

Inference Stable Diffusion with C# and ONNX Runtime
MIT License
218 stars 49 forks source link

VAE is always decoded on CPU #17

Closed Trojaner closed 1 year ago

Trojaner commented 1 year ago

I believe the issue is caused by this line in VaeDecoder.Decode because no sessionOptions are passed to InferenceSession.

I added SessionOptions.MakeSessionOptionWithCudaProvider() and it started using the GPU instead.