diff --git a/candle-examples/examples/trocr/main.rs b/candle-examples/examples/trocr/main.rs index d254e3f0..f857295c 100644 --- a/candle-examples/examples/trocr/main.rs +++ b/candle-examples/examples/trocr/main.rs @@ -115,7 +115,7 @@ pub fn main() -> anyhow::Result<()> { let processor = image_processor::ViTImageProcessor::new(&processor_config); let image = vec![args.image.as_str()]; - let image = processor.preprocess(image)?; + let image = processor.preprocess(image)?.to_device(&device)?; let encoder_xs = model.encoder().forward(&image)?;