From bce36d2938dabdfe757352c87735fcba6d2fe969 Mon Sep 17 00:00:00 2001 From: Helena Kloosterman Date: Wed, 17 Apr 2024 10:13:15 +0200 Subject: [PATCH] Fix model caching for diffusion models and multiple GPUs (#665) --- optimum/intel/openvino/modeling_diffusion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/optimum/intel/openvino/modeling_diffusion.py b/optimum/intel/openvino/modeling_diffusion.py index eb407b4cd1..1e562749b2 100644 --- a/optimum/intel/openvino/modeling_diffusion.py +++ b/optimum/intel/openvino/modeling_diffusion.py @@ -671,7 +671,7 @@ def _compile(self): if ( "CACHE_DIR" not in self.ov_config.keys() and not str(self._model_dir).startswith(gettempdir()) - and self.device.lower().split(":")[0] == "gpu" + and "gpu" in self.device.lower() ): self.ov_config["CACHE_DIR"] = os.path.join(self._model_dir, self._model_name, "model_cache")