From dac3b101436c6e9ace0252cf4b77c0b006115674 Mon Sep 17 00:00:00 2001 From: powderluv Date: Wed, 21 Jun 2023 22:28:45 -0700 Subject: [PATCH] Move torch_mlir import to the top --- apps/stable_diffusion/web/index.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/stable_diffusion/web/index.py b/apps/stable_diffusion/web/index.py index 3f2edf68ee..a0cbd59a62 100644 --- a/apps/stable_diffusion/web/index.py +++ b/apps/stable_diffusion/web/index.py @@ -1,6 +1,11 @@ from multiprocessing import Process, freeze_support import os import sys + +if sys.platform == "darwin": + # import before IREE to avoid torch-MLIR library issues + import torch_mlir + import shutil import PIL, transformers # ensures inclusion in pysintaller exe generation from apps.stable_diffusion.src import args, clear_all