stable-diffusion.cpp icon indicating copy to clipboard operation
stable-diffusion.cpp copied to clipboard

Set low priority to process

Open SA-j00u opened this issue 1 year ago • 2 comments

with low priority you can free use you PC even with 100% CPU load by SD

SA-j00u avatar Apr 13 '24 02:04 SA-j00u

This is something that you'd want your OS to handle, either by adjusting the process "niceness" on POSIX with 'nice' or 'renice' if it's already running. If you're on Windows you can supposedly do something similar with the 'START' command.

grauho avatar Apr 13 '24 12:04 grauho

looks like on windows

#include <windows.h>
SetPriorityClass( GetCurrentProcess(), IDLE_PRIORITY_CLASS);

is enough but i not test it in real software yet

SA-j00u avatar May 04 '24 01:05 SA-j00u