From 1b0f39107ca25101e75c11e559f56cc0531c6f14 Mon Sep 17 00:00:00 2001 From: powderluv Date: Wed, 21 Jun 2023 22:31:35 -0700 Subject: [PATCH] Move torch_mlir import to the top (#1574) --- 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