intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
486 stars 52 forks source link

Only Stable Diffusion Uses Selected Device #7

Closed Lexden12 closed 1 year ago

Lexden12 commented 1 year ago

While stable diffusion appropriately uses GPU for acceleration when selected, when I use any other plugin, it uses the CPU regardless of what device is selected. Given the examples you gave in the README, I am assuming this is expected behavior? If so, then it might make sense to remove the device drop-down from the other plugins?

arisha07 commented 1 year ago

Hello, so that is not expected behavior. It should run on the device you select from the drop down list. Can you check which device name is shown in gimp command window ?

Lexden12 commented 1 year ago

Hello, here is my configuration: ersgan As you can see, I have GPU1 selected. Screenshot 2023-04-07 155932 It says it is loading the network onto GPU1 as well. However, the CPU seems to be running the model: Screenshot 2023-04-07 155913

Lexden12 commented 1 year ago

With the same settings on stable diffusion, I can see a clear increase in GPU VRAM usage: image This does not occur with my test using super resolution.

RyanMetcalfeInt8 commented 1 year ago

Hi @Lexden12, the CPU utilization that you are observing is most likely the OpenCL kernel JIT compilation that runs just before the model is loaded to the compute device. As we don't have OpenVINO model caching enabled (yet), the model will get compiled for each inference. And compared to stable diffusion, which uses a much larger model, the change in VRAM usage / GPU utilization may not be as pronounced.

Lexden12 commented 1 year ago

I see, understood! Thank you for the explanation.