Using pipelin on pytorch mps device

Hi
i want to run pipeline abstract for zero-shot-classification task on the mps device. Here is my code

pipe = pipeline('zero-shot-classification', device = mps_device)
seq = "i love watching the office show"
labels = ['negative', 'positive']
pipe(seq, labels)

The error generated is

RuntimeError: Placeholder storage has not been allocated on MPS device!

Which my guess is because seq is on my cpu and not mps. How can i fix this ?
Is there a way to send seq to the mps device so that i can pass it to the pipe for inference?

Thanks

3 Likes