stable-diffusion.cpp
stable-diffusion.cpp copied to clipboard
GGMLRunner: avoid multiple calls to get_graph
Not setting up the compute graph twice might result in a minor (/negligible?) performance improvement.
Previously it worked like the following in GGMLRunner#compute:
- calls alloc_compute_buffer 1.1 calls reset_compute_ctx 1.2 calls get_graph
- calls reset_compute_ctx
- calls get_graph
Tested on cpu and vulkan locally.