huggingface / controlnet_aux

Apache License 2.0
400 stars 86 forks source link

Fix pidi models ability to run on non primary gpu #109

Open Teriks opened 4 months ago

Teriks commented 4 months ago

The PidiNet detector cannot run on any other GPU aside from GPU 0 due always initializing a specific tensor on the first available GPU.

Changing this line of code so that the tensor is created on the correct GPU fixes the issue and allows PidiNet to run on a device other than the primary GPU.