cassiebreviu / StableDiffusion

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

Memory and performance related issues #29

Closed saddam213 closed 10 months ago

saddam213 commented 10 months ago

Fixing up some memory and performance related issues

  1. Remove spurious Array allocations
  2. Correctly dispose InferenceSessions
  3. Fix Index Out Of Range error when inference step count is too high
  4. Fix SchedulerBase and Scheduler inheritance issues
  5. Move duplicate Scheduler code to SchedulerBase class

May fix some of these issues mentioned here https://github.com/cassiebreviu/StableDiffusion/issues/22#issue-1823340329 https://github.com/cassiebreviu/StableDiffusion/issues/26#issue-1868348304