controlnet_aux icon indicating copy to clipboard operation
controlnet_aux copied to clipboard

add device argument to Processor class

Open erceguder opened this issue 2 years ago • 2 comments

Hey, I've basically added a device argument for the Processor class constructor to allow for cuda, although defaults to cpu. Directly built upon this PR. Backward compatible.

erceguder avatar Oct 20 '23 11:10 erceguder

Hmm is this really necessary? Couldn't we just do the device conversion after loading?

patrickvonplaten avatar Oct 23 '23 16:10 patrickvonplaten

Surely we can do as such. Yet, this might be useful when the processor_id argument passed to the Processor class constructor is a variable, and we want to utilize cuda for checkpoint-based processors. In this case, the proposed change avoids the need for explicitly type-checking whether the processor needs a checkpoint, to load it on cuda.

erceguder avatar Oct 24 '23 14:10 erceguder