diff --git a/examples/image-to-text/run_pipeline.py b/examples/image-to-text/run_pipeline.py index bc48eb2558..8a2906f89f 100644 --- a/examples/image-to-text/run_pipeline.py +++ b/examples/image-to-text/run_pipeline.py @@ -358,6 +358,7 @@ def main(): model = AutoModelForVision2Seq.from_pretrained(args.model_name_or_path, torch_dtype=model_dtype) if model_type == "mllama": model.language_model = initialize_distributed_model(args, model.language_model, logger, model_dtype) + model.to("hpu") else: model = initialize_distributed_model(args, model, logger, model_dtype) generator = pipeline(