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")