Skip to content

Commit 9570045

Browse files
authored
Fix tuned model selection for non-vulkan devices (huggingface#792)
1 parent e4efdb5 commit 9570045

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

shark/examples/shark_inference/stable_diffusion/opt_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def get_params(bucket_key, model_key, model, is_tuned, precision):
3333
]
3434
except KeyError:
3535
raise Exception(
36-
f"{bucket}/{model_key} is not present in the models database"
36+
f"{bucket_key}/{model_key} is not present in the models database"
3737
)
3838

3939
if (
@@ -62,7 +62,7 @@ def get_params(bucket_key, model_key, model, is_tuned, precision):
6262
def get_unet():
6363
# Tuned model is present only for `fp16` precision.
6464
is_tuned = "tuned" if args.use_tuned else "untuned"
65-
if "vulkan" not in args.device and is_tuned:
65+
if "vulkan" not in args.device and args.use_tuned:
6666
bucket_key = f"{args.variant}/{is_tuned}/{args.device}"
6767
model_key = f"{args.variant}/{args.version}/unet/{args.precision}/length_{args.max_length}/{is_tuned}/{args.device}"
6868
else:

0 commit comments

Comments
 (0)