filipstrand / mflux

A MLX port of FLUX based on the Huggingface Diffusers implementation.
646 stars 43 forks source link

Parameter for limiting CPU usage #17

Closed kennell closed 1 week ago

kennell commented 3 weeks ago

Hi there. First of all: Thank you. Things are working wonderful, command line interface is intuitive to use.

Any possibility to throttle CPU usage so we can run this in the background without slowing down the entire machine?

filipstrand commented 3 weeks ago

@kennell Great to hear it is working well for you! I have not really thought of this as a feature before, but it would be nice to have control over it, if possible.

There are supposedly tools like cpulimit for limiting CPU usage, but since we are doing the heavy lifting on the GPU (this can be most easily seen by running a tool such as asitop or mactop during image generation) my guess is that limiting the CPU would not have much effect.

For limiting the GPU usage on Apple Silicon macs, I am not aware of any such tools.