diff --git a/apps/shark_studio/api/initializers.py b/apps/shark_studio/api/initializers.py index 9e99c43ec1..e4593570db 100644 --- a/apps/shark_studio/api/initializers.py +++ b/apps/shark_studio/api/initializers.py @@ -25,7 +25,7 @@ def imports(): action="ignore", category=UserWarning, module="torchvision" ) warnings.filterwarnings( - action="ignore", category=UserWarning, message='.*is deprecated, please use.*', module="*torch*" + action="ignore", category=UserWarning, module="torch" ) import gradio # noqa: F401 diff --git a/apps/shark_studio/api/sd.py b/apps/shark_studio/api/sd.py index 4be20b24d9..14d508f298 100644 --- a/apps/shark_studio/api/sd.py +++ b/apps/shark_studio/api/sd.py @@ -31,8 +31,6 @@ "initializer": clip.export_clip_model, "external_weight_file": None, "ireec_flags": ["--iree-flow-collapse-reduction-dims", - "--iree-opt-const-expr-hoisting=False", - "--iree-codegen-linalg-max-constant-fold-elements=9223372036854775807", ], }, "vae_encode": { diff --git a/apps/shark_studio/modules/pipeline.py b/apps/shark_studio/modules/pipeline.py index b3350dea0c..30a493734b 100644 --- a/apps/shark_studio/modules/pipeline.py +++ b/apps/shark_studio/modules/pipeline.py @@ -32,7 +32,8 @@ def __init__( self.model_map = model_map self.static_kwargs = static_kwargs self.base_model_id = base_model_id - self.device = device + self.device_name = device + self.device = device.split("=>")[-1].strip(" ") self.import_mlir = import_mlir self.iree_module_dict = {} self.tempfiles = {} diff --git a/apps/shark_studio/web/index.py b/apps/shark_studio/web/index.py index 85de5c4126..0d5de9a839 100644 --- a/apps/shark_studio/web/index.py +++ b/apps/shark_studio/web/index.py @@ -126,6 +126,7 @@ def webui(): # # uvicorn.run(api, host="0.0.0.0", port=args.server_port) # sys.exit(0) + import gradio as gr def resource_path(relative_path): """Get absolute path to resource, works for dev and for PyInstaller"""